How to fix ‘npm install’ as root user responds with “node: Permission denied”

npm install ldap-client fastify
> [email protected] install /home/mgiannandrea/node_modules/ldap-client
> node-gyp rebuild

/usr/bin/env: node: Permission denied
.....
npm config set user 0
npm config set unsafe-perm true
npm install ldap-client fastify

Spread the word. Share this post!

Leave Comment

Your email address will not be published. Required fields are marked *