Parcel: 'parcel' is not recognized as an internal or external command

Created on 13 May 2019  路  8Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

馃帥 Configuration (.babelrc, package.json, cli command)

{
  "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.

馃 Expected Behavior

馃槸 Current Behavior

馃拋 Possible Solution

馃敠 Context


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.

馃捇 Code Sample

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel |
| Node |
| npm |
| Windows |

Most helpful comment

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?

All 8 comments

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 ...
Was this page helpful?
0 / 5 - 0 ratings

Related issues

devongovett picture devongovett  路  3Comments

termhn picture termhn  路  3Comments

algebraic-brain picture algebraic-brain  路  3Comments

Niggler picture Niggler  路  3Comments

dsky1990 picture dsky1990  路  3Comments