npm install mac permission denied code example Example: npm install access denied mac sudo chown -R $USER /usr/local/lib/node_modules