After installing and trying to run on the command line I get this back:
"-bash: parcel: command not found"
I tried to fix this by doing the following:
npm uninstall -g parcel-bundler
npm cache clean
npm install -g parcel-bundler
I still got the same issue.
npm version 6.4.1
Try this
alias parcel="npm config get prefix
/bin/parcel"
What OS are you using? Do other packages like prettier work for you?
$ npm install -g prettier
$ prettier
@TosinKristine I think this issue stems from the way I have my machine configured.
I have the latest version of Macs OS. I just installed prettier but got the same response from the Command Line: "-bash: prettier: command not found".
Im able to bypass this issue using npx just as an fyi
Running echo $PATH
in the Terminal prints a colon seperated list of folder, /usr/local/bin
should be in there to pick up the npm global binaries.
If not, you somehow messed up the PATH (in .bash_profile
, .bashrc
or .profile
).
I'm closing this issue as it's not related to Parcel, but feel free to ask if you need help here.
use this:
sudo npm install -g parcel-bundler
The parcel doesn't like it if your parent directories have spaces in them. Use dashes or underscore and you should be good to go. I know this because it literally just happened to me.
npm bin -g
this command returns your npm bin path,
which on my computer /usr/local/bin/lib/node_modules/bin
and use this
export PATH=$PATH:/usr/local/bin/lib/node_modules/bin
npm bin -g
this command returns your npm bin path,
which on my computer /usr/local/bin/lib/node_modules/bin
and use this
export PATH=$PATH:/usr/local/bin/lib/node_modules/bin
It 100 percent worked for me. Thanks.
Most helpful comment
use this:
sudo npm install -g parcel-bundler