Also seeing the EIO error with npm install with OSX Version 1.12.0-rc4-beta20 (build: 10404). Seems to happen at random. Run “npm install” multiple times and it will eventually finish with no error.
npm ERR! Linux 4.4.15-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EIO
npm ERR! errno -5
npm ERR! syscall read
npm ERR! EIO: i/o error, read
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 4.4.15-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.10.46
npm ERR! npm v2.15.1
npm ERR! code EIO
npm ERR! errno 55
npm ERR! EIO, close
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
This occurs when I mount the volume in docker run -v "$PWD":/usr/src/build .... However, if I use a COPY in the Dockerfile and build the image with required files and run it without a volume, it install just fine.
Docker for mac Version 1.12.0-rc4-beta20 (build: 10404)
$ docker info
Client:
Version: 1.12.0-rc4
API version: 1.24
Go version: go1.6.2
Git commit: e4a0dbc
Built: Wed Jul 13 03:28:51 2016
OS/Arch: darwin/amd64
Experimental: true
Server:
Version: 1.12.0-rc4
API version: 1.24
Go version: go1.6.2
Git commit: e4a0dbc
Built: Wed Jul 13 03:28:51 2016
OS/Arch: linux/amd64
Experimental: true
I was happily running ‘npm install’ in a couple of my own containers this morning. When I returned after lunch I had a notification of a new version of docker beta which I downloaded and installed - Version 1.12.0-beta21 (build: 10868). I restarted the same containers that were running this morning quite happily and now I get:
npm WARN enoent ENOENT: no such file or directory, open '/home/****/src/node_modules/eslint/package.json’
npm ERR! Linux 4.4.15-moby
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” "install"
npm ERR! node v4.4.4
npm ERR! npm v3.10.5
npm ERR! path …/esprima/bin/esvalidate.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall symlink
npm ERR! enoent ENOENT: no such file or directory, symlink ‘…/esprima/bin/esvalidate.js’ -> '/home//src/node_modules/lab/node_modules/.bin/esvalidate’
npm ERR! enoent ENOENT: no such file or directory, symlink ‘…/esprima/bin/esvalidate.js’ -> '/home//src/node_modules/lab/node_modules/.bin/esvalidate’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/****/src/npm-debug.log
npm ERR! code 1
Since this same container was running quite happily only an hour previously it can only have been introduced by the update. Please help, I can’t do any development!!
PS I’ve tried ‘npm cache clear’ and ‘npm cache clean’ and removing ‘~/.npm’, all to no avail.
Just removed ‘npm install’ command from docker-compose, started container, exec’d into it, deleted node_modules directory and ran ‘npm install’ manually. This time I get:
I also had this issue in the last update of the beta and the stable release. Both on OSX. I was getting 404’s sometimes, corrupt files and write failures to the mounted file system.
My team is seeing the same problem with beta21 whereas beta20 worked fine. Is there a place where we can download the old version as a temporary solution until this is fixed?
Edit: This has been confirmed by the docker team and fix has already been written but not yet released.
@theonlysean my understanding of the current plan is that this bugfix will reach stable early next week in a hotfix in order to ensure the fix does not introduce a worse regression than the defects it corrects. Right now, stable 1.12 and beta are close enough that switching channels either direction shouldn’t cause any issues but they will likely diverge, perhaps incompatibly, later in the 1.13 release cycle and so switching from beta back to stable may not be possible without resetting your installation at that time.
We’re still adjusting to having multiple release channels so we appreciate your thoughts on how we can do this sort of thing better while still exercising caution for stable users.
I was getting this error for hours. I found it very frustrating. I ended up looking through the npm install flags and found one that did the trick --no-bin-links. For whatever reason, npm bin symlinks don’t play nice with docker for mac volumes. If you run:
npm install --no-bin-links
instead of the naked npm install, you should be fine. One more thing: any npm scripts you might have had in your package.json now require that node be referenced manually (e.g. “webpack ...” becomes “node ./node_modules/webpack/bin/webpack ...”).
This issue has been fixed on the beta channel with a Beta 21 hotfix. A stable hotfix should be shipped next week. It is safe to switch bidirectionally between Beta 21 and 1.12 but that guarantee may not hold for other beta releases.
I can also confirm this is fixed in beta 21. Really frustrating issue that is a stumbling block to adopting Docker for Mac full time as I exclusively build node applications. Is there an open Github issue that is tracking this somewhere?