N option to install an npm package without dependencies

npm

I'm attemting to modify an npm package with multiple dependencies. As such npm install -g . takes a long time to execute. Do I have other options besides removing the dependencies from packages.json?

Best Answer

--no-optional option is now implemented according to this documentation https://docs.npmjs.com/cli/install :

The --no-optional argument will prevent optional dependencies from being installed.
Related Question