got npm access permission issue when i was installing hubot RC adapter by following this tutorial https://github.com/RocketChat/hubot-rocketchat, when i did yo hubot --owner="OWNER <owner@example.com>" --name="bot" --description="Bot" --adapter="rocketchat@0.1", gave me errors as below:
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "hubot" "hubot-scripts" "hubot-diagnostics" "hubot-help" "hubot-heroku-keepalive" "hubot-google-images" "hubot-google-translate" "hubot-pugme" "hubot-maps" "hubot-redis-brain" "hubot-rules" "hubot-shipit" "hubot-rocketchat" "--save"
npm ERR! node v4.5.0
npm ERR! npm v3.10.8
npm ERR! path /home/jy/.npm/commander/2.6.0
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/home/jy/.npm/commander/2.6.0'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/home/jy/.npm/commander/2.6.0']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/home/jy/.npm/commander/2.6.0',
npm ERR! parent: 'express' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jy/hubot/npm-debug.log```
I tried ``` sudo chown -R jy /usr/local/lib/node_modules/```, still have the same error message. what is next i can do? NVM?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.