Parcel Command Not Found

Parcel Command Not Found

In my project, I use Parcel to bundle everything. Now, I am at the point where I need to deploy my app. I clone my git repo with my React app and I put in the Node server.

I tried every command possible to install parcel, but I always get the following error :


> pp-react@0.1.0 build /home/volodymk/react
> parcel build index.html

sh: parcel: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! pp-react@0.1.0 build: `parcel build index.html`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pp-react@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/volodymk/.npm/_logs/2020-01-12T19_26_22_634Z-debug.log

How can I fix this ?

1 Answer

To run any installed node package (not just Parcel), use npx, the utility command shipped with npm. It executes packages that come with a runtime command in your node_modules/packagename/.bin directories.

As in npx parcel build index.html

More information available in the npx readme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.