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.

EUNCOMMIT when publishing from CI - package-lock.json

See original GitHub issue

Thank you for publishing and maintaining this package.

Expected Behavior

Packages publish lickety-split

Current Behavior

Publishing packages...
lerna notice cli v3.13.1
lerna info versioning independent
lerna info canary enabled
lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove changes before continuing.

The uncommitted changes are all in package-lock.json, are all more or less:

-          "resolved": false,
+          "resolved": "",

Possible Solution

reset the package lock in CI?

Steps to Reproduce (for bugs)

CI runs the following steps:

  1. npm ci
  2. linting, testing, etc
  3. this script runs to publish packages:
echo "Authenticating with Registry..."
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN -q

echo "Configuring CI Git User..."
git config --global user.email octocat@github.com
git config --global user.name Github Actions

git status
git diff

echo "Publishing packages..."
npx lerna publish --canary --yes
lerna.json

{
  "packages": [
    "packages/*"
  ],
  "version": "independent",
  "command": {
    "publish": {
      "conventionalCommits": true
    },
    "version": {
       "message": "chore: release new versions",
       "conventionalCommits": true
    }
  }
}

Context

I’ve got a monorepo of web components. each one has a build step via rollup, then we (hope to ) publish with semantic release. This is my initial attempt to publish

Your Environment

CI is running on github actions, with the Github actions for NPM action, running “npm run deploy:ci”

Executable Version
lerna --version 3.13.1
npm --version 6.5.0
node --version v10.15.3
OS Version
NAME VERSION
Github actions for NPM actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
a613commented, Dec 8, 2020

an open PR

What is it?

@evocateur

1reaction
JordanBonitatiscommented, Sep 24, 2019

@kaminskypavel - is the npm version you are using locally the same that you’re using in your CI environment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lerna not generating package-lock.json for every package
npm i --package-lock-only fails for me because the pacakge has an internal dependency. npm i is trying to resolve that but its not...
Read more >
Using private packages in a CI/CD workflow - npm Docs
You can use access tokens to test private npm packages with continuous integration (CI) systems, or deploy them using continuous deployment (CD) systems....
Read more >
JavaScript Monorepos with Lerna - Semaphore CI
Move all your applications, libraries, subprojects, and shared code into the packages folder. Each project should have a package.json and, ...
Read more >
Semantic-release-lerna - npm.io
semantic-release plugin to publish lerna managed npm packages to npm. ... prepare, Update the package.json version and create the npm package tarball.
Read more >
Demystifying npm install, npm ci & package-lock.json - Medium
I want to share with you my findings about the npm install behaviour and how it acts to package.json and package-lock.json files.
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