I am using ubuntu 16.04. I have install polymer-cli npm install -g polymer-cli which is properly installed but when I enter command polymer server
it is throwing error that polymer:command not found.
polymer : command not found
1.7k Views Asked by Abhishek Borikar At
3
There are 3 best solutions below
0
On
For me the answer relied in the fact that the bin folder of node wasn't defined in PATH.
The fix for me was to add it to the export PATH= part in my .zshrc-file or, if you don't use ZSH, .bash_profile. To know what to add to this PATH export run npm bin -g. For me the output was /usr/local/Cellar/node/11.14.0_1/bin. After this I opened my .zshrc-file and added the :/usr/local/Cellar/node/11.14.0_1/bin to the PATH definition. Notice the : which distinguishes a new location.
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/local/Cellar/node/11.14.0_1/bin"
Good luck!
To check if a package is globally installed you can take a look at the npm root folder.
npm root -gwill show you the root folderls $(npm root -g)therefore lists all public installed packages.If you do not find polymer-cli there then your global installation was not successful... if you find it there but you still can not use it you probably want to try to reinstall it.