I/o error on mounted directory

Expected behavior

It should be able to do I/O on the file in the mounted directory.

Actual behavior

I/O failed

npm ERR! Linux 4.4.11-moby
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "i"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! path /webroot/node_modules/.staging/alter-4f38aef3/package.json
npm ERR! code EIO
npm ERR! errno -5
npm ERR! syscall open
npm ERR! EIO: i/o error, open '/webroot/node_modules/.staging/alter-4f38aef3/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR!     /webroot/npm-debug.log

Information

  • Windows 10
  • Docker version 1.11.1, build 5604cbe
  • D drive is shared

The error happens when running npm install inside the mounted directory. A number of packages were installed correctly before the error happened, so it did not fail immediately.

Dockerfile:

FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g ember-cli
RUN npm install -g bower
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 4200
EXPOSE 35729
VOLUME /webroot
WORKDIR /webroot

Steps to reproduce the behavior

  1. git clone https://github.com/kapolos/ember-glimmer-react-motion-demo8-remake.git
  2. cd ember-glimmer-react-motion-demo8-remake
    3.(using the docker image from above) docker run -it --rm -v d:\dock\ember-glimmer-react-motion-demo8-remake\:/webroot test/embercli npm i

It might be that npm (or the package) is trying to create symlinks. Those are not always supported currently for host-mounted volumes. Can you try building and running the app without -v mounting or using --no-bin-links with npm.

I’d be curious to know if your issue and mine can be fixed in the same way, by using a newer version of the SMB protocol.

@techjosh we’re looking at adjusting those SMB mount options in line with what you suggested.

1 Like

we are getting error at deployment to aws-appsync

Error: EIO: i/o error, chmod '/folder/company-api/.webpack/getFunction1/node_modules/aws-appsync/node_modules/graphql/module/type/definition.js'

Are you using yarn and mounting a host directory into the volume? I’m getting similar errors on my local development env.

1 Like

I am having the same errors with yarn. Please how were you able to fix this?