What is the point of putting npm’s “package-lock.json” under version control?

In my experience, it does not make sense to put package-lock.json under version control. It makes managing large merge/rebases a nightmare. However, there are instances where the package-lock can be very useful. Recently (2017/10/10) moment.js introduced breaking changes in a minor version update. Meaning if one was to ship with no package-lock.json, and had something … Read more

How to solve `package-json found. … To clear this warning, remove package-lock.json`, I think it was overlapped by npm when yarn install

I noticed a similar warning today . The issue went off after I deleted package.json file.I had used yarn and npm interchangeable until now in my side project. ‘npm install’ creates package-lock.json and ‘yarn install’ generates yarn.lock . Normally you stick to either one of the package managers in your project

Should package-lock.json also be published?

It cannot be published. From the npm documentation: One key detail about package-lock.json is that it cannot be published, and it will be ignored if found in any place other than the toplevel package See package-lock.json documentation on docs.npmjs.com. However, you should be commiting your package-lock.json to git as per the documentation. This file is … Read more

Proper way to fix potential security vulnerability in a dependency defined in package-lock.json

New: now, with npm@6 you can directly run npm audit fix Old answer: You should try to identify the problematic package’s name, and then run npm install package-name replacing package-name, obviously. This will install the latest version of the package, and very often, the latest version has fixed the security issue. If you have a … Read more

How do I fix a vulnerable npm package in my package-lock.json that isn’t listed in the package.json?

It sounds like Hoek is a dependency of one of your dependencies (so, a package you have in your package.json is requiring it from it’s own package.json). You’ve already tried deleting/reinstalling and updating your project dependencies without success, so it seems that the package dependency in question has an explicit or max version specified. Without … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)