npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

installing module uninstals others modile

What I Wanted to Do

I have few https git packages in package json. I want to install private ssh+git repo after initial installation is done.

npm ci 
npm install npm install git+ssh://git@gitlab.com/private_repo_path.git#master --save --no-audit

removed 3 packages and updated 1 package in 16.676s

What Happened Instead

Npm removes my https modules during installation of private git+ssh module.

Reproduction Steps

  1. add these packages to your package.json
    "react-native-track-player": "https://github.com/react-native-kit/react-native-track-player.git#dev",
    "react-native-twitter-signin": "https://github.com/GoldenOwlAsia/react-native-twitter-signin.git",
    "react-native-vimeo": "https://github.com/Myagi/react-native-vimeo.git",
  1. install it once using npm install, make sure npm ci works.
  2. now try to install any private git+ssh repo.
npm install git+ssh://git@gitlab.com/git_repo_path.git#master --save --no-audit
  1. observe
    git https:// repos have been removed during step 3.

Details

I’ve reproduced it on local ubuntu and in docker.
related issues:

Platform Info

$ npm --versions
npm --versions
{ npm: '6.7.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.34.0',
  node: '11.10.0',
  openssl: '1.1.1a',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.26.0',
  v8: '7.0.276.38-node.17',
  zlib: '1.2.11' }

$ node -p process.platform
linux

this is very annoying issue.


fixed by upgrading to 5.8.0 and calling “npm install”.
npm ci is working after that