0
votes

I am using npm versioned 5.4.2, I have some node_modules, now from 3.x npm module behavior is if the modules inside node_modules directory are not defined in package.json, then npm deletes the modules in node_modules.

  1. how to override this behavior, like I do not want to remove the npm modules already installed even if they are not defined in package.json

  2. If new module is added using "npm install", I do not want to overwrite package.json file.

How to achieve this? Is there any flag in .npmrc?

With regards,

-M-

1

1 Answers

1
votes
  1. Not the answer, but still... : https://github.com/npm/npm/issues/16853
  2. npm install package --no-save