NPM install problems

Expected behavior

npm install works

Actual behavior

Errors out with what seems an IO problem

Information

When doing an npm install on a container I have. I can’t get it to build correctly when using Docker for Mac. It builds fine using docker-machine. The first thing is that it takes a very very long time. Not sure why this is. I have mounted a local (mac) volume inside the container. Maybe that is the reason as npm is writing to the mounted volume. Are there any known issues around this?

This is a tail of the install log:

oms_1               | > phantomjs@1.9.20 install /service/node_modules/phantomjs
oms_1               | > node install.js
oms_1               |
oms_1               | Considering PhantomJS found at /usr/local/bin/phantomjs
oms_1               | Looks like an `npm install -g`
oms_1               | Linking to global install at /usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs
oms_1               | Writing location.js file
oms_1               | npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
oms_1               | npm WARN deprecated lodash@1.2.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
oms_1               | npm WARN optional dep failed, continuing uglify-js@2.6.2
oms_1               | npm WARN optional dep failed, continuing uglify-js@2.6.2
oms_1               | npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
oms_1               | npm WARN optional dep failed, continuing graceful-fs@3.0.8
oms_1               | npm WARN optional dep failed, continuing form-data@0.1.4
oms_1               | npm WARN optional dep failed, continuing hawk@1.1.1
oms_1               | npm WARN optional dep failed, continuing request@2.40.0
oms_1               | npm ERR! Linux 4.4.9-moby
oms_1               | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--allow-root" "--interactive=false"
oms_1               | npm ERR! node v0.12.14
oms_1               | npm ERR! npm  v2.15.1
oms_1               | npm ERR! code EIO
oms_1               | npm ERR! errno -5
oms_1               |
oms_1               | npm ERR! EIO, fstat
oms_1               | npm ERR!
oms_1               | npm ERR! If you need help, you may report this error at:
oms_1               | npm ERR!     <https://github.com/npm/npm/issues>
oms_1               |
oms_1               | npm ERR! Please include the following file with any support request:
oms_1               | npm ERR!     /service/npm-debug.log
oms_1               |
oms_1               | npm ERR! Linux 4.4.9-moby
oms_1               | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
oms_1               | npm ERR! node v0.12.14
oms_1               | npm ERR! npm  v2.15.1
oms_1               | npm ERR! code ELIFECYCLE
oms_1               | npm ERR! order_management@0.1.1 build: `./script/npm-build`
oms_1               | npm ERR! Exit status 251
oms_1               | npm ERR!
oms_1               | npm ERR! Failed at the order_management@0.1.1 build script './script/npm-build'.
oms_1               | npm ERR! This is most likely a problem with the order_management package,
oms_1               | npm ERR! not with npm itself.
oms_1               | npm ERR! Tell the author that this fails on your system:
oms_1               | npm ERR!     ./script/npm-build
oms_1               | npm ERR! You can get information on how to open an issue for this project with:
oms_1               | npm ERR!     npm bugs order_management
oms_1               | npm ERR! Or if that isn't available, you can get their info via:
oms_1               | npm ERR!
oms_1               | npm ERR!     npm owner ls order_management
oms_1               | npm ERR! There is likely additional logging output above.
oms_1               |
oms_1               | npm ERR! Please include the following file with any support request:
oms_1               | npm ERR!     /service/npm-debug.log

Thanks.
Hamza Khan-Cheema

I have the same issue, also with PhantomJS. I think this happens because the osxfs doesn’t yet support fstat function. This should work as soon as it’s implemented. This seems to be about the same issue: Can’t start elasticsearch with mounted data directory - [f]stat[v]fs family of functions