Report this

What is the reason for this report?

npm access permission issue when install hubot rocket.chat adapter

Posted on October 13, 2016

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!

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.