lerna publish fails with code 128
See original GitHub issuelearn publish task get success result but return 128 code.
Expected Behavior
Complete the publish with correct return.
Current Behavior
Step 17/27 : RUN lerna publish from-package --yes --no-git-reset --registry http://verdaccio:4873
---> Running in 3a471ffbbd92
info cli using local version of lerna
lerna notice cli v4.0.0
lerna notice FYI Unable to verify working tree, proceed at your own risk
lerna WARN Unable to determine published version, assuming "@scope/project-2" unpublished.
lerna WARN Unable to determine published version, assuming "@scope/project-1" unpublished.
Found 2 packages to publish:
- @scope/project-1=> 1.0.0
- @scope/project-2 => 1.0.0
lerna info auto-confirmed
lerna info publish Publishing packages to npm...
lerna notice Skipping all user and access validation due to third-party registry
lerna notice Make sure you're authenticated properly ¯\_(ツ)_/¯
lerna notice FYI Unable to set temporary gitHead property, it will be missing from registry metadata
lerna info lifecycle root@undefined~prepare: root@undefined
lerna WARN lifecycle root@undefined~prepare: cannot run in wd root@undefined husky install (wd=/home/app)
lerna http fetch PUT 201 http://verdaccio:4873/@scope%2fproject-1 63ms
lerna success published @scope/project-1 1.0.0
lerna notice
lerna notice package: @scope/project-1@1.0.0
lerna notice === Tarball Contents ===
...
lerna notice === Tarball Details ===
lerna notice name: @scope/project-1
lerna notice version: 1.0.0
lerna notice filename: scope-project-1-1.0.0.tgz
lerna notice package size: 2.2 kB
lerna notice unpacked size: 5.0 kB
lerna notice shasum: e53d4a877b93ded03fbf963361fcdfed26964b06
lerna notice integrity: sha512-IIwEQAoY+2Jp2[...]ckHIlblArCIOQ==
lerna notice total files: 6
lerna notice
lerna http fetch PUT 201 http://verdaccio:4873/@scope%2fproject-2 46ms
lerna success published @scope/project-2 1.0.0
lerna notice
lerna notice package: @scope/project-2@1.0.0
lerna notice === Tarball Contents ===
...
lerna notice === Tarball Details ===
lerna notice name: @scope/project-2
lerna notice version: 1.0.0
lerna notice filename: scope-projecy-2-1.0.0.tgz
lerna notice package size: 19.3 kB
lerna notice unpacked size: 161.6 kB
lerna notice shasum: 813955c93200b7b4c71a211ee00aa7db615a7d50
lerna notice integrity: sha512-WHmDH12wdLrA6[...]v0ETCW/u1GAdw==
lerna notice total files: 57
lerna notice
Successfully published:
- @scope/project-1@1.0.0
- @scope/project-2@1.0.0
lerna success published 2 packages
The command '/bin/sh -c lerna publish from-package --yes --no-git-reset --registry http://verdaccio:4873' returned a non-zero code: 128
Possible Solution
Steps to Reproduce (for bugs)
- Create a Dockerfile to publish to a local verdaccio.
- Create npm user.
- Publish
lerna.json
{
"packages": ["packages/*"],
"version": "0.0.0",
"npmClient": "yarn",
"useWorkspaces": true
}
lerna-debug.log
Step 17/27 : RUN lerna publish from-package --yes --no-git-reset --registry http://verdaccio:4873
---> Running in 3a471ffbbd92
info cli using local version of lerna
lerna notice cli v4.0.0
lerna notice FYI Unable to verify working tree, proceed at your own risk
lerna WARN Unable to determine published version, assuming "@scope/project-2" unpublished.
lerna WARN Unable to determine published version, assuming "@scope/project-1" unpublished.
Found 2 packages to publish:
- @scope/project-1=> 1.0.0
- @scope/project-2 => 1.0.0
lerna info auto-confirmed
lerna info publish Publishing packages to npm...
lerna notice Skipping all user and access validation due to third-party registry
lerna notice Make sure you're authenticated properly ¯\_(ツ)_/¯
lerna notice FYI Unable to set temporary gitHead property, it will be missing from registry metadata
lerna info lifecycle root@undefined~prepare: root@undefined
lerna WARN lifecycle root@undefined~prepare: cannot run in wd root@undefined husky install (wd=/home/app)
lerna http fetch PUT 201 http://verdaccio:4873/@scope%2fproject-1 63ms
lerna success published @scope/project-1 1.0.0
lerna notice
lerna notice package: @scope/project-1@1.0.0
lerna notice === Tarball Contents ===
...
lerna notice === Tarball Details ===
lerna notice name: @scope/project-1
lerna notice version: 1.0.0
lerna notice filename: scope-project-1-1.0.0.tgz
lerna notice package size: 2.2 kB
lerna notice unpacked size: 5.0 kB
lerna notice shasum: e53d4a877b93ded03fbf963361fcdfed26964b06
lerna notice integrity: sha512-IIwEQAoY+2Jp2[...]ckHIlblArCIOQ==
lerna notice total files: 6
lerna notice
lerna http fetch PUT 201 http://verdaccio:4873/@scope%2fproject-2 46ms
lerna success published @scope/project-2 1.0.0
lerna notice
lerna notice package: @scope/project-2@1.0.0
lerna notice === Tarball Contents ===
...
lerna notice === Tarball Details ===
lerna notice name: @scope/project-2
lerna notice version: 1.0.0
lerna notice filename: scope-projecy-2-1.0.0.tgz
lerna notice package size: 19.3 kB
lerna notice unpacked size: 161.6 kB
lerna notice shasum: 813955c93200b7b4c71a211ee00aa7db615a7d50
lerna notice integrity: sha512-WHmDH12wdLrA6[...]v0ETCW/u1GAdw==
lerna notice total files: 57
lerna notice
Successfully published:
- @scope/project-1@1.0.0
- @scope/project-2@1.0.0
lerna success published 2 packages
The command '/bin/sh -c lerna publish from-package --yes --no-git-reset --registry http://verdaccio:4873' returned a non-zero code: 128
Context
Your Environment
Executable | Version |
---|---|
lerna --version |
4.0.0 |
yarn --version |
1.22.5 |
node --version |
14:15 |
OS | Version |
---|---|
NAME | VERSION |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
How To Set Up GitHub Actions to Publish a Lerna Monorepo
lerna error Command failed with exit code 128. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Read more >lerna run `lerna version patch` throw error git remote update ...
But i cannot use lerna version patch and it give me the error: ... Error: Command failed with exit code 1: git remote...
Read more >lerna publish fails with code 128 - - Bountysource
lerna publish fails with code 128. lerna. 20 August 2021 Posted by iamchathu. learn publish task get success result but return 128 code....
Read more >lerna/publish/README.md - UNPKG
40, This is useful when a previous `lerna publish` failed to publish all packages to ... consumers avoid automatically upgrading to prerelease-quality code....
Read more >Github – How To Set Up GitHub Actions to Publish a Lerna ...
Github – How To Set Up GitHub Actions to Publish a Lerna Monorepo ... device or address lerna ERR! lerna error Command failed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates about this issue? Same error in my CI environment.
@ssehacker not sure why you are tagging me – this isn’t my project