commit everything but lerna version warning 'working tree has uncommitted changes'

See original GitHub issue

Expected Behavior

Publish success

Current Behavior

Publish failed and I don’t know which error caused, and why have these errors:

  • lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove changes before continuing.
  • npm ERR! 404 not_found document not found: -/user/ice-admin/package
➜  iceland-packages git:(master) npm run publish

> iceland-packages@1.0.0 publish /Users/sobear/work/iceland/iceland-packages
> lerna publish

lerna notice cli v3.1.2
lerna info versioning independent
lerna info Looking for changed packages since @ali/iceland-dsl2code@0.7.42
? Select a new version for @ali/iceland-dsl2code (currently 0.7.42) Patch (0.7.43)
? Select a new version for @ali/iceland-intelligent-layout (currently 0.2.32) Patch (0.2.33)

Changes:
 - @ali/iceland-dsl2code: 0.7.42 => 0.7.43
 - @ali/iceland-intelligent-layout: 0.2.32 => 0.2.33

? Are you sure you want to publish these packages? Yes
lerna info lifecycle iceland-packages@1.0.0~version: iceland-packages@1.0.0

> iceland-packages@1.0.0 version /Users/sobear/work/iceland/iceland-packages
> lerna version

lerna notice cli v3.1.2
lerna info versioning independent
lerna info Looking for changed packages since @ali/iceland-dsl2code@0.7.42
lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove changes before continuing.
lerna info lifecycle iceland-packages@1.0.0~version: Failed to exec version script
lerna ERR! lifecycle error running version in iceland-packages
lerna ERR! lifecycle  Error: iceland-packages@1.0.0 version: `lerna version`
lerna ERR! lifecycle Exit status 1
lerna ERR! lifecycle     at EventEmitter.<anonymous> (/Users/sobear/work/iceland/iceland-packages/node_modules/_npm-lifecycle@2.1.0@npm-lifecycle/index.js:301:16)
lerna ERR! lifecycle     at emitTwo (events.js:126:13)
lerna ERR! lifecycle     at EventEmitter.emit (events.js:214:7)
lerna ERR! lifecycle     at ChildProcess.<anonymous> (/Users/sobear/work/iceland/iceland-packages/node_modules/_npm-lifecycle@2.1.0@npm-lifecycle/lib/spawn.js:55:14)
lerna ERR! lifecycle     at emitTwo (events.js:126:13)
lerna ERR! lifecycle     at ChildProcess.emit (events.js:214:7)
lerna ERR! lifecycle     at maybeClose (internal/child_process.js:925:16)
lerna ERR! lifecycle     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
lerna info git Pushing tags...
lerna info publish Publishing packages to npm...
lerna WARN ETHIRDPARTY Skipping ping of http://registry.npm.private.com as most third-party registries do not support advanced npm functionality
npm http request GET http://registry.npm.private.com/-/org/ice-admin/package?format=cli
npm http 404 http://registry.npm.private.com/-/org/ice-admin/package?format=cli
npm http request GET http://registry.npm.private.com/-/user/ice-admin/package?format=cli
npm http 404 http://registry.npm.private.com/-/user/ice-admin/package?format=cli
npm ERR! code E404
npm ERR! 404 not_found document not found: -/user/ice-admin/package

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sobear/.npm/_logs/2018-08-21T07_13_41_117Z-debug.log

lerna ERR! EWHOAMI Authentication error. Use `npm whoami` to troubleshoot.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iceland-packages@1.0.0 publish: `lerna publish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iceland-packages@1.0.0 publish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sobear/.npm/_logs/2018-08-21T07_13_41_145Z-debug.log

lerna.json

{
  "lerna": "3.1.2",
  "packages": [
    "packages/*"
  ],
  "command": {
    "publish": {
      "ignoreChanges": [
        "demo",
        "test",
        "*.md"
      ]
    }
  },
  "version": "independent",
  "npmClient": "xnpm",
  "registry": "http://registry.npm.private.com"
}

Your Environment

Executable Version
lerna --version VERSION
npm --version 8.11.1
yarn --version VERSION
node --version 5.6.0
OS Version
NAME VERSION
macOS Sierra 10.13.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evocateurcommented, Aug 21, 2018

If you’ve already run lerna version and you’re on the same tagged commit, you need to run lerna publish from-git, otherwise it will fail just as you’ve reported.

I’ve never heard of http://registry.npm.private.com/, but it sounds like it isn’t API-compatible with the public npm registry. You can pass --no-verify-registry and --no-verify-access to lerna publish to disable those checks.

0reactions
lock[bot]commented, Dec 27, 2018

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

@lerna/check-working-tree | Yarn - Package Manager
Change Log. All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
Read more >
How to run lerna publish on Travis with modifying .npmrc file?
It all worked fine (for NPM publish) until I switched to lerna. Now when I run lerna publish, I can see a message...
Read more >
Lerna 入门级教程- 掘金
EUNCOMMIT Working tree has uncommitted changes, please commit or ... ¯\_(ツ)_/¯ lerna WARN ENOLICENSE Packages one and two are missing a ...
Read more >
semantic-release-lerna - npm Package Health Analysis - Snyk
lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove the following changes before continuing: Configure @semantic-release/git ...
Read more >
Troubleshooting | Lerna
Prior to the release of Lerna v2.0.0-rc.3 users of the flag --npm-client who provided yarn as a client ... Failing when git tree...
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