What is the difference between npm-shrinkwrap.json and package-lock.json?

The files have exactly the same content, but there are a handful of differences in how npm handles them, most of which are noted on the docs pages for package-lock.json and npm-shrinkwrap.json: package-lock.json is never published to npm, whereas npm-shrinkwrap is by default package-lock.json files that are not in the top-level package are ignored, but … 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

Why does `package-lock.json` causes a failure in a docker container build when `npm install`?

From your question: Note: npm install works fine on my local machine, just fails in docker container If you are using npm install, you are not sure to have the same version of dependencies. For having a reproducible environment, without unexpected issues because of different version of dependencies, you’d rather use npm ci (clean-install): This … Read more

Do I need both package-lock.json and package.json?

Do you need both package-lock.json and package.json? No. Do you need the package.json? Yes. Can you have a project with only the package-lock.json? No. The package.json is used for more than dependencies – like defining project properties, description, author & license information, scripts, etc. The package-lock.json is solely used to lock dependencies to a specific … Read more

Error: Local workspace file (‘angular.json’) could not be found

I just had the same problem. It’s related to release v6.0.0-rc.2, https://github.com/angular/angular-cli/releases: New configuration format. The new file can be found at angular.json (but .angular.json is also accepted). Running ng update on a CLI 1.7 project will move you to the new configuration. I needed to execute: ng update @angular/cli –migrate-only –from=1.7.4 This removed .angular-cli.json … Read more