hubot-rocketchat: Error Running Yo: npm ERR! not a package /tmp/npm-30929-OgybIFr-/github.com/RocketChat/asteroid.git
When I run yo hubot as a non-root user, I am receiving the following error:
[richlu@chat r2z2-test3]$ yo hubot
_____________________________
/ \
//\ | Extracting input for |
////\ _____ | self-replication process |
//////\ /_____\ \ /
======= |[^_/\_]| /----------------------------
| | _|___@@__|__
+===+/ /// \_\
| |_\ /// HUBOT/\\
|___/\// / \\
\ / +---+
\____/ | |
| //| +===+
\// |xx|
? Owner r2z2
? Bot name r2z2.api
? Description A simple helpful robot for your Company
? Bot adapter (campfire) rocketchatgot back false
? Bot adapter rocketchat
create bin/hubot
create bin/hubot.cmd
create Procfile
create README.md
create external-scripts.json
create hubot-scripts.json
create .gitignore
create package.json
create scripts/example.coffee
create .editorconfig
_____________________________
_____ / \
\ \ | Self-replication process |
| | _____ | complete... |
|__\\| /_____\ \ Good luck with that. /
|//+ |[^_/\_]| /----------------------------
| | _|___@@__|__
+===+/ /// \_\
| |_\ /// HUBOT/\\
|___/\// / \\
\ / +---+
\____/ | |
| //| +===+
\// |xx|
npm ERR! not a package /tmp/npm-30929-OgybIFr-/github.com/RocketChat/asteroid.git
npm ERR! Error: ENOENT, open '/tmp/npm-30929-OgybIFr-/github.com/RocketChat/asteroid.git-unpack/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.10.0-327.el7.x86_64
npm ERR! command "/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! cwd /home/richlu/r2z2-test3
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! path /tmp/npm-30929-OgybIFr-/github.com/RocketChat/asteroid.git-unpack/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! not ok code 0
My package.json turns out empty of dependencies. The last time I ran yo hubot, although a few months now, it was running fine. I had yo installed as root. When I try running yo hubot as root I receive:
[root@chat hubot-test]# yo hubot
Error: EACCES, permission denied '/root/.config'
at Object.fs.mkdirSync (fs.js:654:18)
at sync (/usr/local/lib/node_modules/yo/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/local/lib/node_modules/yo/node_modules/mkdirp/index.js:77:24)
at Object.create.all.get (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:38:13)
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:130:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
The file /root/.config doesn’t exist. I am not sure if this is a relevant issue. I’m just trying to dig deeper and determine where this issue is coming from and would like some help.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (5 by maintainers)
Issued a
npm install -g npmper @richardwlu suggestion (thanks!) and it upgraded npm to v3.10.6.I was then able to execute
npm install hubot-rocketchatwithout errors. Appears everything is working now.@mcmcghee I did some testing and I am led to believe the issue is coming from an outdated version of npm or yo. There must be a directory structure change or something.
Hubot generation failed with the following:
Hubot generation successful with the following:
We’re running fairly close versions of npm. What version of yo are you running? Try updating npm with
npm install -g npm.