Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forkify Parcel installation #426

Open
jamil-7 opened this issue Apr 21, 2024 · 2 comments
Open

Forkify Parcel installation #426

jamil-7 opened this issue Apr 21, 2024 · 2 comments

Comments

@jamil-7
Copy link

jamil-7 commented Apr 21, 2024

Hi guys
I have installed the parcel, but when I try to start it as the video says, I get an error.
It says the main file format should not be HTML. However, the video changes the main part in the JSON.package to index.html.

How do I fix it ??

Server running at http://localhost:1234
🚨 Build failed.

@parcel/core: Unexpected output file type .html in target
"main"

/Users/nasersobhan/Desktop/Coding/The complete JavaScript Course Udemy/complete-javascript-course-master/18-forkify/starter/package.json:5:11
4 | "description": "Recipe application",

5 | "main": "index.html",
| ^^^^^^^^^^^^ File extension must be .js, .mjs, or .cjs
6 | "scripts": {
7 | "start": "parcel index.html",

💡 The "main" field is meant for libraries. If you meant
to output a .html file, either remove the "main" field
or choose a different target name.
📝 Learn more:
https://parceljs.org/features/targets/#library-targets

@MatinT-SA
Copy link

Have you tried installing parcel version 1.12.3 and see if you get any errors?

@akozdev
Copy link

akozdev commented Oct 18, 2024

Hey, remove this line "main": "index.html", from your package.json, save it, and try npm start again. Let me know if it works for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants