npm access permission issue when install hubot rocket.chat adapter

October 13, 2016 129 views
Applications Ubuntu

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! Linux 4.4.0-38-generic
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?

1 Answer

This is resolved, pls don't reply. Thanks

Have another answer? Share your knowledge.