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.json.lerna_backup can get left behind after builds

See original GitHub issue

We recently ran into an issue where a Lerna build left package.json.lerna_backup behind and it didn’t clean up after itself.

Expected Behavior

All builds should clean up build artifacts after they finish, successful or otherwise.

Current Behavior

package.json.lerna_backup can remain in the filesystem after a build completes.

Possible Solution

Steps to Reproduce (for bugs)

  1. Run Lerna, apparently.
  2. We don’t have clear repro steps; there wasn’t a build failure when this occurred.

@gigabo is familiar with our setup so I’m going to refrain from pasting configs unless requested.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vyorkincommented, Oct 2, 2017

I’m really suffering from the same problem. Almost every when time I got some postinstall error from one of subpackages (or any error at all) during install, my package.json is messed up and its content is replaced with lerna build artifacts. Every time this happens I need to remember to remove the current package.json and rename package.json.lerna_backup to package.json. Otherwhise (if I forget about this and do the npm i again after fixing the error) it will do weird things. I guess its possible to reproduce this by just pressing ctrl+c during install, not sure about this though. I believe this is incorrect behaviour and lerna should clean after itself in case of failure. What do you think?

0reactions
lock[bot]commented, Apr 3, 2019

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started | Lerna
All Lerna functionality will work the same way regardless. This tutorial will give you an introduction to Lerna's features. To get started with...
Read more >
Configuration Options - Renovate Docs
Configuration Options usable in renovate.json or package.json. ... On Azure there can be a delay between a PR being set as completed by...
Read more >
5 Tips about lerna - Medium
In this article, I will introduce some common questions about using lerna to create a javascript monorepos project. If you want to have...
Read more >
Monorepo Tutorial With Lerna, Storybook & Next.js - ButterCMS
Complete monorepo tutorial using Lerna, Storybook, and Next.js. Code samples and screenshots included: Build your own monrepo project today!
Read more >
Using lint-staged, husky, and pre-commit hooks to fail fast and ...
json . In the multi-package repo we have a single linting config set up in the root package, with its rules applied across...
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