Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

npm install fails in mounted folder, success in unmounted folder #638

Open
laurencefass opened this issue Apr 5, 2017 · 2 comments
Open

Comments

@laurencefass
Copy link

Description
"npm install" doesnt work in a container's mounted folder specified using docker run -v /host-folder:/mounted/folder. same project installs and runs fine in an unmounted folder. i am using standard windows toobox setup e.g. windows vbox host => ubuntu guest (also docker host) => ubutnu container.

Steps to reproduce the issue:

  1. clone any node.js project from github into the /mounted/folder specified with docker run -v (see above).
  2. cd /mounted/folder
  3. $/mounted/folder> npm install
  4. observe it fail with message in observed results (below)
  5. clone the exact same node.js project in an unmounted folder
  6. cd /unmounted/folder
  7. $u/nmounted/folder> npm install
  8. observe successful install
  9. $unmounted/folder> npm start
  10. observe successful start

Describe the results you received:
[email protected] /home/vs3/public_html/todo
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/acorn):
npm WARN rofs SKIPPING OPTIONAL DEPENDENCY: EROFS: read-only file system, symlink '../acorn/bin/acorn' -> '/home/vs3/public_html/todo/node_modules/.bin/acorn'
npm ERR! Linux 4.4.57-boot2docker
npm ERR! argv "/root/.nvm/versions/node/v7.8.0/bin/node" "/root/.nvm/versions/node/v7.8.0/bin/npm" "install"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! path ../mime/cli.js
npm ERR! code EROFS
npm ERR! errno -30
npm ERR! syscall symlink

npm ERR! rofs EROFS: read-only file system, symlink '../mime/cli.js' -> '/home/vs3/public_html/todo/node_modules/.bin/mime'
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.

npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-04-05T13_31_52_475Z-debug.log

Describe the results you expected:
npm install to pass.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Docker version 17.03.0-ce, build 60ccb22

Output of docker info:

 docker@default:~$ docker info
Containers: 2
 Running: 1
 Paused: 0
 Stopped: 1
Images: 6
Server Version: 17.03.1-ce
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 22
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.4.57-boot2docker
Operating System: Boot2Docker 17.03.1-ce (TCL 7.2); HEAD : 4c264fa - Tue Mar 28 21:11:51 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.8 MiB
Name: default
ID: 4Q62:2FV4:AVXL:Q6VS:K5LL:PZ2M:E6A7:NVIR:UT5H:HAOS:SBUQ:YBQC
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 32
 Goroutines: 46
 System Time: 2017-04-05T15:54:42.380044496Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):
windows 10/vbox 5 host running Docker default machine running an ubuntu container.
container npm: v4.2.0
container node: v7.8.0

@hphirke
Copy link

hphirke commented May 10, 2017

Similar issue:
broofa/mime#153

@hphirke
Copy link

hphirke commented May 10, 2017

@thaJeztah - I think the issue lies with NPM and not docker. This is a wrong project for that too.

I have created a issue in npm project:
npm/npm#16586

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants