independent full stack developer

/ Developer's blog

What if npm can't find the node /usr/bin/env: ‘node’: No such file or directory

Tuesday, March 19, 2024

Fixed! There is a popular issue when you try to make bower install and get the error about /usr/bin/env: "node": No such fileor directory. It's easy to fix.

for example, you get something like that

root@space:/var/www/space/public# bower install
/usr/bin/env: ‘node’: No such file or directory

To fix it, just make a symbolic link for your node-js in /usr/bin folder, and that's it!

root@space:/usr/bin# node
node-gyp  nodejs    
root@space:/usr/bin# ln -s nodejs node


 

9595 people already saw it