In my development project I have package.json
that contains 3 groups of dependencies:
Our build integration machine is the only one set-up to be able to pull all dependencies, while all Dev machines cannot, which creates a nightmare of dependency installation.
Is it possible to tell NPM within the install
command to install all except, and provide the list of modules in package.json
to be skipped during the installation?
Otherwise, what is the best way to deal with such a situation, considering that getting all the proxies set up with all the permissions isn't realistic?
You can use another way like "optionalDependencies" described in the official documentation here:
https://docs.npmjs.com/cli/v6/configuring-npm/package-json#optionaldependencies
Example:
{
"dependencies": {
"some-package-name-1": "1.0.0"
},
"devDependencies": {
"some-package-name-2": "1.0.0"
},
"optionalDependencies": {
"some-package-name-3": "1.0.0"
}
}
and call
npm install --no-optional
it will install only the following:
some-package-name-1, some-package-name-2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With