parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.53k stars 2.27k forks source link

Parcel Cannot resolve entry #4507

Closed vishwajeetraj11 closed 4 years ago

vishwajeetraj11 commented 4 years ago
D:\study\[FreeCourseSite.com] Udemy - Node.js, Express, MongoDB & More The Complete Bootcamp 2020\4-natours\starter>parcel ./public/js/index.js index.js

Server running at http://localhost:1234 

×  Cannot resolve entry "D:\study\[FreeCourseSite.com] Udemy - Node.js, Express, MongoDB & More The Complete Bootcamp 2020\4-natours\starter\public\js\index.js" from 
"D:\study\[FreeCourseSite.com] Udemy - Node.js, Express, MongoDB & More The Complete Bootcamp 2020\4-natours\starter\public\js"

    at Bundler.bundle (C:\Users\VISHWAJEET\AppData\Roaming\npm\node_modules\parcel-bundler\src\Bundler.js:268:19)

I have cross-checked the file is actually at the location (D:\study[FreeCourseSite.com] Udemy - Node.js, Express, MongoDB & More The Complete Bootcamp 2020\4-natours\starter\public\js\index.js)

package.json

{
  "name": "natours",
  "version": "1.0.0",
  "description": "Learning Node, Express, MongoDB, Mongoose, Pug and building the natours project along the way",
  "main": "app.js",
  "scripts": {
    "start": "nodemon server.js",
    "start:prod": "SET NODE_ENV=production& nodemon server.js",
    "debug": "ndb server.js",
    "watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js"
  },
  "author": "Vishwajeet Raj",
  "license": "ISC",
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "cookie-parser": "^1.4.5",
    "dotenv": "^8.2.0",
    "express": "^4.16.4",
    "express-mongo-sanitize": "^2.0.0",
    "express-rate-limit": "^5.1.1",
    "helmet": "^3.22.0",
    "hpp": "^0.2.3",
    "jsonwebtoken": "^8.5.1",
    "mongoose": "^5.9.2",
    "morgan": "^1.9.1",
    "ndb": "^1.1.5",
    "nodemailer": "^6.4.6",
    "parcel-bundler": "^1.12.4",
    "pug": "^2.0.4",
    "slugify": "^1.4.0",
    "validator": "^12.2.0",
    "xss-clean": "^0.1.1"
  },
  "devDependencies": {
    "eslint": "^6.8.0",
    "eslint-config-airbnb": "^18.0.1",
    "eslint-config-prettier": "^6.10.0",
    "eslint-plugin-import": "^2.20.1",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-node": "^11.0.0",
    "eslint-plugin-prettier": "^3.1.2",
    "eslint-plugin-react": "^7.18.3",
    "prettier": "^1.19.1"
  },
  "engines": {
    "node": ">=10.0"
  }
}
mischnic commented 4 years ago

Could the spaces in the filepath cause this?

vishwajeetraj11 commented 4 years ago

I got really tired of that error and I switched to webpack and it worked.

On Sun, May 3, 2020 at 3:42 AM Niklas Mischkulnig notifications@github.com wrote:

Could the spaces in the filepath cause this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parcel-bundler/parcel/issues/4507#issuecomment-623022205, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIUYUYEVWKLLUHEFPKC23TRPSLEHANCNFSM4MNDOOOA .

rndmax commented 4 years ago

Could the spaces in the filepath cause this?

Thanks, the spaces were an obstacle.