1

I would like to use npm ci instead of npm install for creating a reproducible environment each time a project is setup. Full details of the reasons for this approach can be found here.

But since npm install is ubiquitous it may sometimes be used by mistake. Therefore I want to disable to use of npm install on a project.

I still want to be able to use npm install <package_name> to install individual packages, but disable the use of npm install when installing the entire project.

How can that be done?

I have already attempted using this:

"scripts": {
  "install": "npm ci",
}

But it creates an infinite install loop, with the installation running again and again.

TinyTiger
  • 1,801
  • 7
  • 47
  • 92

0 Answers0