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

Upgrading npm removes modules #18325

Open
2 of 8 tasks
mark007 opened this issue Aug 28, 2017 · 0 comments
Open
2 of 8 tasks

Upgrading npm removes modules #18325

mark007 opened this issue Aug 28, 2017 · 0 comments

Comments

@mark007
Copy link

mark007 commented Aug 28, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

When upgrading npm in a clean nodejs 8.4.0 alpine docker environment, the upgrade to npm 5.4.0 seems to be removing packages thats making basic commands like npm -v fail.

How can the CLI team reproduce the problem?

Place the following three lines into a Dockerfile

FROM node:8.4.0-alpine
RUN npm install -g npm@5.4
RUN npm -v

Build the dockerfile using

docker build .

supporting information:

  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).

Here is a snippet from the end of the docker build. It seems npmlog is getting removed?

Step 3/3 : RUN npm -v
---> Running in 7de66987d57b
module.js:491
throw err;
^

Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:22:13
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)

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

1 participant