{
"name": "__",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"dev": "parcel server.js",
"build": "parcel build server.js"
},
"author": "Kyle Rebstock",
"license": "__",
"dependencies": {
"@types/socket.io": "^2.1.2",
"express": "^4.16.4",
"socket.io": "^2.2.0"
},
"devDependencies": {
}
}
// I have started with no config as parcel claims you don't need one.
I can't build.
I was able to get it to build and run at one point, but as soon as I close my cmd or gitbash both to try restarting nothing works again.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel |
| Node |
| npm |
| Windows |
Solution was simply uninstalling both global and local versions.
Then install with this line exactly.
npm install parcel-bundler --save-dev
For some reason it is different than when I write
npm i parcel-bundler --save-dev?
These commands (should) do the same thing. And the local version is always preferred over the global one (for the scripts in package.json and when using npx
).
Has anyone found a solution?
Solution was simply uninstalling both global and local versions.
Then install with this line exactly.npm install parcel-bundler --save-dev
For some reason it is different than when I write
npm i parcel-bundler --save-dev?
I had the same exact problem and this worked for me too, thank you for posting.
why is it working ?
i am not getting it.
please can anyone explain it to me .
I uninstall the global and dev version and then install just local version and setup the package.json.
the documentation here explain the right way everything:
https://parceljs.org/getting_started.html
In my package.json file I have this:
"devDependencies": {
"parcel-bundler": "^1.12.4"
When other team members run
npm install we can see that it is installing parcel
but then when they try to run
parcel build
We get
'parcel' is not recognized as an internal or external command
Any guesses about what is missing?
you need to run parcel via an npm script or npx or yarn:
npx parcel ...
yarn parcel ...
Most helpful comment
Solution was simply uninstalling both global and local versions.
Then install with this line exactly.
For some reason it is different than when I write
npm i parcel-bundler --save-dev?