1

node version v14.15.3

npm version 6.14.9

sh: node: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @angular/cli@11.0.5 postinstall: `node ./bin/postinstall/script.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @angular/cli@11.0.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Can anyone give the cloue why I am getting this error ? and how to resolve

Thanks in advance

Muhammed Albarmavi
  • 23,240
  • 8
  • 66
  • 91
suri kumar
  • 11
  • 1
  • The nodejs command does not seem to work. First check that the `node -v` command works. also you should check your shell bin `$PATH`. How to set node's `$PATH`? – myeongkil kim Dec 21 '20 at 09:39
  • Yes it is working v14.15.3 – suri kumar Dec 21 '20 at 09:40
  • where is your `npm` binary? type `which npm` – myeongkil kim Dec 21 '20 at 09:42
  • /var/nodejs_14/node-v14.15.3-linux-x64/bin/npm – suri kumar Dec 21 '20 at 09:43
  • Could you restart your shell / terminal and check if the problem still reproduces in the new terminal? – BogdanBiv Dec 21 '20 at 09:51
  • yes, restarted problem still there – suri kumar Dec 21 '20 at 09:58
  • Seems to be a problem you didn't add the binary path to your shell. See [node-command-not-found](https://stackoverflow.com/questions/13593902/node-command-not-found). If the above process is cumbersome, it is recommended to delete the node and use [nvm](https://github.com/nvm-sh/nvm). Node has a strong dependency on versions by default, and if you are running multiple projects, it is recommended to manage each version separately. – myeongkil kim Dec 21 '20 at 10:03

0 Answers0