Question

npm access permission issue when install hubot rocket.chat adapter

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?
Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is resolved, pls don’t reply. Thanks