Questions tagged [package-lock.json]

224 questions
2
votes
1 answer

why the ^ symbol before the version is removed from package-lock.json

I noticed that whenever I did npm install --save, my package-lock.json file got modified and the ^ symbol removed from the version. For example, "@babel/core": { "version": "7.7.2", "resolved":…
woodykiddy
  • 6,074
  • 16
  • 59
  • 100
2
votes
1 answer

How do I apply changes in package-lock and package json?

I manually changed my dependencies in package-lock.json and package.json files. How do I now apply those changes to my node-modules without updating/touching other dependencies?
Massaget
  • 340
  • 1
  • 6
  • 17
2
votes
2 answers

Check that NPM package.json and package-lock.json are compatible

Is there a way to check if a package-lock.json file is compatible with package.json without running npm install? Compatible means the versions specified package.json can be fulfilled by package-lock.json. Current approach I'm currently checking…
Joe
  • 3,370
  • 4
  • 33
  • 56
2
votes
1 answer

How can I pass to my source code the package-lock.json file generated inside my container?

I am trying build a good workflow to work with docker and nodejs I think that I have a good base, but I can not get the package-lock.json generated inside my container to my source code even though I have a defined volume this is my Dockerfile: FROM…
2
votes
0 answers

Find conflicting versions between package-lock.json and yarn.lock when both exists

I have some cases where in one project I have both package-lock.json and yarn.lock files (this is done unintentionally, but it's not relevant at the moment) - In order to remove one of them (personally I prefer leaving the yarn.lock file) - I first…
Yaron U.
  • 7,681
  • 3
  • 31
  • 45
2
votes
1 answer

Ignoring certain packages in package-lock.json

I am having a certain conundrum and can't seem to find the correct solution. The current project I am working in uses npm to manage our packages. We haven't been using package-lock.json for a while, but need to re-include it. The problem is, we…
2
votes
1 answer

Why would package-lock.json ever be updated with generic versions?

Why is my package-lock.json getting updated from specific versions to GENERIC semantic versions? After running npm install... Here's the diff: Here's an actual code snippet: BEFORE "@babel/highlight": { "version": "7.0.0-beta.54", "resolved":…
tcmoore
  • 1,129
  • 1
  • 12
  • 29
2
votes
1 answer

package-lock.json contains non-exact versions

According to package-lock.json's documentation It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates. I'm looking at a…
papiro
  • 2,158
  • 1
  • 20
  • 29
2
votes
0 answers

create or derive package-lock.json file from npm-shrinkwrap.json

Previously we had old version of npm and I used npm-shrinkwrap.json file to lock down the dependencies. Now we upgarded to npm 6 and I want to use package-lock.json instead of old npm-shrinkwrap.json . So how can I create a package-lock.json…
Gangadhar Jannu
  • 4,136
  • 6
  • 29
  • 49
2
votes
1 answer

Error logs after package-lock.json is generated

After installing babel-cli package locally on a project.. I started to get error logs when I type npm list --depth 0 in the command line. It's very annoying.. but I'm not sure if it's casing any other problems. I've tried to install babel-cli and…
YahiaRefaiea
  • 172
  • 1
  • 12
2
votes
1 answer

after clone: npm install produces different package-lock file

I'm using npm 5.6.0 and node v6.9.5 on OSX El Capitan 10.11.6. Scenario: I have a nodejs project where a package-lock.json is created after every npm install as expected. The project, including the package-lock.json, is checked into a repository and…
hreimer
  • 785
  • 8
  • 31
1
vote
1 answer

npm 'latest' tag in package.json not getting latest version

I'm confused by the intended behaviour of specifying "latest" as the version for a dependency in package.json and I'm hoping someone can explain it and/ or point me at where the behaviour is documented. If I specify "@myPackageName": "latest in my…
trwoodward
  • 11
  • 2
1
vote
1 answer

NPM Error old lockfile The package-lock.json file was created with an old version of NPM

package-lock.json creating problem for upgrading Angular 9 to 10 How can I create a fresh package-lock.json file and update Angular 9 to 10? I want to update Angular 9 to 10 and want to solve this package-lock.json error.
1
vote
0 answers

Why a NextJs application is adding some extra node modules config in package-lock.json after the NextJs app is launched?

I´ve a NextJs & ReactJs application built up with these libs: "next": "^13.3.1", "next-auth": "^4.20.1", "next-http-proxy-middleware": "^1.2.5", "next-pwa": "^5.6.0", Let´s assume all dependencies listed in the project package.json…
axel
  • 3,778
  • 4
  • 45
  • 72
1
vote
0 answers

Can't git push the package-lock.json of my react-native app after upgrading expo sdk from version 45 to 46

So, Expo Go was advising me to upgrade Expo SDK from 45 to 46. The upgrading went well and I could push my changes. However, when I run "npm install" and the package-lock.json file gets created I cannot push anymore. I created a commit with only…
Niffi
  • 11
  • 2