Site icon NgDeveloper

[Solved] /usr/bin/env: node: Permission denied

[Solved] usrbinenv-node- Permission- denied-featured
[Solved] usrbinenv-node- Permission- denied-blog

Step 1: Unlink the existing /usr/bin/node

sudo unlink /usr/bin/node

Step 2: Find the node path

whereis node

your result will be something like this,
/home/ec2-user/.nvm/versions/node/v14.7.0/bin/node

Step 3: Now link this path,

sudo ln -s /home/ec2-user/.nvm/versions/node/v14.7.0/bin/node /usr/bin/node

Step 4: Now try running sudo npm install

it should work without any issues.

Exit mobile version