Is it possible to not generate package-lock.json with npm 5?

Viewed 4488

I've updated npm to it's latest version recently to get the performance upgrade. But since my company hasn't updated globally, I don't want the usage of package-lock.json.

I could simply ignore it in git workflow by adding package-lock.json to my .git/info/exclude. But it would still be used by npm when installing or updating dependencies.

So how can I tell npm not to use it?

2 Answers

To disable package-lock.json in a project you can add .npmrc file and content of this file will be

package-lock=false

if you try to install with npm the file will not generate.

Related