Skip to content

Forkify Parcel installation  #426

@jamil-7

Description

@jamil-7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions