0

I'm getting all these errors. I'm using sudo npm install -g strongloop and also tried sudo npm --unsafe-perm install -strongloop but still get these errors below.

This is on an AWS server by the way. It installs perfectly fine locally on my Mac, but it's like something is possibly wrong with permissions or it isn't compatible with Ubuntu, not sure.

npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/strongloop/node_modules/strong-arc/node_modules/strong-pm/node_modules/strong-service-install/node_modules/strong-service-upstart/node_modules/lodash/internal/baseMergeDeep.js'

npm ERR! If you need help, you may report this log at:

npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! or email it to:

npm ERR!     <npm-@googlegroups.com>



npm ERR! System Linux 3.13.0-48-generic

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "-g" "--unsafe-perm" "install" "strongloop"

npm ERR! cwd /home/ubuntu

npm ERR! node -v v0.10.25

npm ERR! npm -v 1.3.10

npm ERR! path /usr/local/lib/node_modules/strongloop/node_modules/strong-arc/node_modules/strong-pm/node_modules/strong-service-install/node_modules/strong-service-upstart/node_modules/lodash/internal/baseMergeDeep.js

UPDATE:

Now getting these errors after updating npm and nodejs to versions 2.11 and 0.12.7:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 3.13.0-48-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 

> bufferutil@1.1.0 install /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil/.node-gyp"
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 3.13.0-48-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/strongloop/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
npm WARN deprecated MD5@1.2.2: deprecated, use lowercase 'md5@2.x' from now on

> strong-fork-syslog@1.2.3 install /usr/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/.node-gyp"
|
Nathan McKaskle
  • 2,926
  • 12
  • 55
  • 93
  • It's definitely compatible with Ubuntu. Did you try install other npm packages globally? Do they work? – superkhau Aug 11 '15 at 01:25
  • Yes other npm packages installed just fine, like the ones in my package.json. I also can't seem to start node.js by typing node . but that's another issue. – Nathan McKaskle Aug 12 '15 at 14:57
  • You are using a version of node with known vulnerabilities and a version of npm with many known bugs like the race condition you appear to be experiencing. Are you required to use these old versions? – Ryann Graham Aug 12 '15 at 21:31
  • I installed node and npm using apt-get... How did I end up with such old versions? – Nathan McKaskle Aug 12 '15 at 22:34

2 Answers2

0

Did you try deleting (or renaming for backup) your ~/.npm directory and trying again? ENOENT usually denotes some sort of corruption and permissions issues during a previous interrupted or bad install command.

There are also many posts online on how to remove npm completely and reinstall, which also might fix the issue.

UPDATE: This is a gist I put together to capture all the things I've installed recently. Node in particular is a pain (node vs nodejs executable name).

https://gist.github.com/notbrain/4c0c9fd415f3479493a3

notbrain
  • 3,366
  • 2
  • 32
  • 42
  • No, I just rebuilt the server completely and started over, same error every time. – Nathan McKaskle Aug 12 '15 at 14:53
  • What steps did you do to recreate the server? More importantly how did you install node and npm? I'll add the gist I used to install a bunch of stuff on 14.04 successfully to my answer. – notbrain Aug 12 '15 at 21:15
  • 1
    For a non-deb alternative, the approach I use for StrongLoop's Vagrant boxes, Docker images, and VM images is to use the official binary tarballs. Here's an example: https://github.com/strongloop-community/strongbox/blob/master/node/Dockerfile – Ryann Graham Aug 12 '15 at 21:33
  • This is an AWS server so I just terminated the old one and launched a new one. I don't know how Amazon configures these but I'm pretty sure it's just a base install of Ubuntu. I'm getting new errors after having updated NPM and NodeJS because apt-get has very old versions. See edited post above. – Nathan McKaskle Aug 15 '15 at 19:47
  • Looks like you need to `sudo apt-get install build-essential`, since the install can't find make. Also, did you run `sudo apt-get update && sudo apt-get upgrade` to get everything updated and patched before doing anything? – notbrain Aug 16 '15 at 03:32
0

I got similar errors and solved it by symlinking nodejs as in this answer. After doing this the installation worked just fine.

Community
  • 1
  • 1
user1732111
  • 56
  • 1
  • 6
  • Node was linked to `nodejs`, and not to `node`. Because of this, the Strongloop installation produced errors. When I solved the naming conflict and reinstalled Strongloop it worked fine. – user1732111 Nov 16 '15 at 10:34