Question

hubot- rocket.chat adapter installing problem

I am installing hubot-rocket.chat adapter using https://github.com/RocketChat/hubot-rocketchat “add adapter to hubot” section. when i get to the step of yo hubot --owner=“OWNER owner@example.com” --name=“bot” --description=“Bot” --adapter=“rocketchat”, i got error message:

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@1.0.5” “–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/usor/npm-debug.log

I tried use Root to do it, it gave me error: Error: EACCES: permission denied, open ‘/root/.config/configstore/insight-yo.json’ You don’t have access to this file.

at Error (native) at Object.fs.openSync (fs.js:549:18) at Object.fs.readFileSync (fs.js:397:15) at Object.create.all.get (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:34:26) at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:27:44) at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/index.js:37:34) at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:172:11) at Module._compile (module.js:409:26) at Object.Module._extensions…js (module.js:416:10) at Module.load (module.js:343:32) root@ubuntu-1gb-sfo2-01:~/usor# node -v v4.5.0 root@ubuntu-1gb-sfo2-01:~/usor# npm -v 3.10.8

I get the feel it is the access problem, i tried sudo chmod g+rwx /root /root/.config /root/.config/configstore, it says the directory doesn’t exist. What will be the best way to resolve this? Installing NVM? if so, what else do i need to do?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Ryan Quinn
DigitalOcean Employee
DigitalOcean Employee badge
October 11, 2016
Accepted Answer

This is an odd issue. Since the root user should have the permissions by default to write to directories under ~/.config and based on the other message you mentioned I wonder if /root/.config/configstore doesn’t exist.

I am guessing that this may be because you ran the first couple commands as a regular user so the needed directories were not created in the /root path. I would make sure you are root and start from the beginning.

Thanks for the quick response. I started as regular user and used sudo, then i changed to root and start all over, still give me the permission issue.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.