question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`package-lock.json` files on the packages, is that the right behavior?

See original GitHub issue

Every time when I edit the package.json file of one of my packages and add a new dependency, I got a new package-lock.json file on that package after the new dependency installed.

I wondering if that’s the right behavior. Should sub-packages also have package-lock.json files?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:19
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
kirill-konshincommented, Mar 29, 2019

I bet this has to be reopened…

15reactions
mikesteadcommented, Mar 4, 2018

Just a note on one scenario. I’ve been using Lerna to work on a bunch of node (micro-)services. Each package is released as a Docker image. When I build that image I want to npm install the exact prod dependencies to ensure correctness. For this setup a lock file per package is required.

Perhaps not what Lerna was envisioned for but thought worth a mention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

But what the hell is package-lock.json?
package.json is a file that contains information about your project (name, version, etc) and it lists the packages that your project is ...
Read more >
Everything You Wanted To Know About package-lock.json But ...
This conflict between expect and real behavior sparked a very interesting issue thread in the npm repo. Some people thought that the package....
Read more >
Do I commit the package-lock.json file created by npm 5?
Yes, package-lock.json is intended to be checked into source control. If you're using npm 5+, you may see this notice on the command...
Read more >
Why does package-lock.json exist, and how does it work?
When writing JavaScript applications, you describe its dependencies using a package.json file. This file contains all of your applications ...
Read more >
What are package.json and package-lock.json? - LinkedIn
Whenever you hit npm install it installs all packages in your application right? But there is a lot happens behind the scene. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found