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.

Exclude --package-lock-only from npm install

See original GitHub issue

Current Behavior

By running the command, npx lerna version --conventional-commits --no-changelog --no-push --yes, later on It is using npm install (npm install --package-lock-only --ignore-scripts) command internally. Due to certain changes in package lock file, It is failing repeatedly. I want to exclude it.

  • Exact error: lerna ERR! Error: Command failed with exit code 1: npm install --package-lock-only --ignore-scripts

Expected Behavior

I found may be similar issue here: https://github.com/lerna/lerna/issues/3386

Failure Logs / Configuration

lerna.json

{
  "packages": [
    "**"
  ],
  "version": "independent",
  "npmClientArgs": [
    "--legacy-peer-deps"
  ]
}

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TombolaSheplesscommented, Dec 5, 2022

@ghiscoding Can confirm that deleting the lock file and running npm i seems to have resolved the issue - packages are now publishing fine again. No idea how it got itself into a non-working-state. Thanks very much for your help.

0reactions
ghiscodingcommented, Dec 5, 2022

try running npm install --package-lock-only in the shell without Lerna. If that fails, then like I said, try to delete the lock file (you might also need to delete node_modules) and rerun npm install to recreate the lock file, that might work and might use a newer structure… if that still doesn’t work, then try with npm install --package-lock-only --legacy-peer-deps

and for the reason why it worked before but fails today is because prior to today you probably didn’t have any dependencies version that changed but you do today so it fails

Read more comments on GitHub >

github_iconTop Results From Across the Web

'npm install --no-package-lock' does not use ... - GitHub
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >
package-locks - npm Docs
Using a locked package is no different than using any package without a package lock: any commands that update node_modules and/or package.json 's...
Read more >
How to exclude a module from the package-lock.json?
The file will be versioned. I am just interested in excluding an specific module from the content of the file itself. node.js ·...
Read more >
Disabling package-lock.json - codeburst
To tell npm not to create a package-lock.json lock file for your current project, create a file called .npmrc at the root of...
Read more >
npm Application Analysis - Sonatype Help
For npm, scanning the package-lock.json is required. No results are returned if you only scan the package.json; Scan after the npm install command...
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