Search code examples
javascriptnpmparceljs

How do I manually change a file name in Parcel?


Every time I try to run npm start or npm build I get an error saying unknown: Entry /mnt/c/Users/kabre/Desktop/18-forkify/index.html does not exist. I got told that Parcel might be automatically renaming my index.html. Not sure how to go on about fixing this since I'm just starting out learning Parcel/npm.


Solution

  • Try this:

    • Run npm init -y in your project
    • Install parcel in your project: npm install parcel-bundler --save-dev
    • Put this in your package.json:
      "scripts": {
        "start": "parcel ./index.html",
      }
    
    • Run npm start after this.

    And will running perfect.

    Find more in https://parceljs.org/getting_started.html