npm install diskusage fails on alpine linux #15422

Open
jonathan-kosgei opened this Issue Jan 7, 2017 · 0 comments

Projects

None yet

1 participant

@jonathan-kosgei

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

My docker (alpine) app won't run because of a failed npm install

In the pm2 logs for the app I have this error:

Error: Cannot find module 'diskusage'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Function._load (/usr/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/app.js:8:19)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12

When I try to npm install diskusage I get:

/app # npm install diskusage

> ref@1.3.3 install /app/node_modules/ref
> node-gyp rebuild

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "diskusage"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! ref@1.3.3 install: `node-gyp rebuild`
npm ERR! Exit status -2
npm ERR! 
npm ERR! Failed at the ref@1.3.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "diskusage"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh

npm ERR! ref@1.3.3 install: `node-gyp rebuild`
npm ERR! spawn sh ENOENT
npm ERR! 
npm ERR! Failed at the ref@1.3.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /app/npm-debug.log

How can the CLI team reproduce the problem?

git clone https://github.com/kamikazechaser/ServerBot
cd ServerBot
npm prune
npm install
pm2 start app.js

supporting information:

  • npm -v prints: 3.10.3
  • node -v prints: v6.6.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Alpine
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@jonathan-kosgei jonathan-kosgei referenced this issue in jonathan-kosgei/sc-issues Jan 7, 2017
Closed

Deploy Fails #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment