Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Test in Docker container as part of Continuous Integration #13907

Closed
1 task done
chadnickbok opened this issue Sep 8, 2016 · 4 comments
Closed
1 task done

Test in Docker container as part of Continuous Integration #13907

chadnickbok opened this issue Sep 8, 2016 · 4 comments

Comments

@chadnickbok
Copy link

chadnickbok commented Sep 8, 2016

I'm opening this issue because:

  • npm is crashing.

What's going wrong?

There is a bug when trying to update packages using npm inside a docker container.

How can the CLI team reproduce the problem?

  • Install Docker
  • Launch a Node container: docker run -i -t node /bin/bash
  • Update npm: npm install -g npm

This result in the following error:

npm ERR! Linux 4.4.15-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "npm"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/glob/node_modules/minimatch
npm ERR! code EXDEV
npm ERR! errno -18
npm ERR! syscall rename

npm ERR! EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/npm/node_modules/glob/node_modules/minimatch' -> '/usr/local/lib/node_modules/npm/node_modules/glob/node_modules/.minimatch.DELETE'
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!     /npm-debug.log
npm ERR! code 1

What's the feature?

I suggest a Docker container be added to the Continuous Integration environments, to catch these kinds of issues sooner.

I'd argue that having npm be tested inside a Docker container is easily as important as testing on Windows.

Is this a feature you're prepared to implement, with support from the npm CLI team?

Sure thing.

@chadnickbok
Copy link
Author

These are all issues that reference Docker and could perhaps be caught sooner with a Docker CI environment:

#13249
#11605
#9863
#13529
#13528
#13520
#13266
#13249
#13224

@martinheidegger
Copy link

Imho. it should actually be run in a docker container matrix: all the official https://hub.docker.com/_/node/ images and for each: both a version where the source folder is part of the container and one where it is a virtual folder.

@frank-dspeed
Copy link

docker run -i -t node /bin/bash

#then paste this in or create costum node image 

cd $(npm root -g)/npm \
  && npm install fs-extra \
  && sed -i -e s/graceful-fs/fs-extra/ -e s/fs\.rename/fs.move/ ./lib/utils/rename.js \

# run your command again all works
 npm install -g npm

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

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

No branches or pull requests

4 participants