[Q] How to disable publish tarball file?
See original GitHub issueI used npm@6 and lerna@^3.13.0 for publishing my package in customized npm registry. but it throw the error.
ZlibError: zlib: Cannot read property 'length' of null
at Gzip.Zlib.(anonymous function) (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:126:21)
at Gzip.write (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:247:21)
at Object.source.on.chunk (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/@lerna/pack-directory/node_modules/tar/lib/pack.js:340:18)
at Object.emit (events.js:159:13)
at Object.emit (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minipass/index.js:307:25)
However it’s successful with npm@<6.
Possible Solution
I guess the reason is that the customized registry does not support tarball file to publish. so How to disable publish tarball file?
lerna.json
{
"packages": ["packages/*"],
"version": "independent",
"command": {
"publish": {
"skipGit": true,
"registry": "http://registry.npm.baidu-int.com",
"conventionalCommits": true,
"changelogPreset": "befe",
"message": "chore(release): publish %s"
},
"bootstrap": {
"hoist": ["jest", "edam"],
"npmClientArgs": []
}
},
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**"]
}
lerna-debug.log
0 silly argv { _: [ 'add' ],
0 silly argv dev: true,
0 silly argv D: true,
0 silly argv scope: '**',
0 silly argv globs: [],
0 silly argv lernaVersion: '3.11.1',
0 silly argv '$0': 'lerna',
0 silly argv pkg: 'npm@5' }
1 notice cli v3.11.1
2 verbose rootPath /Users/yucong02/baidu/erp-fe/edam-vendor
3 info versioning independent
4 error ZlibError: zlib: Cannot read property 'length' of null
4 error at Unzip.Zlib.(anonymous function) (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:126:21)
4 error at Unzip.write (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:247:21)
4 error at Unzip.flush (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:206:10)
4 error at Unzip.end (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/minizlib/index.js:213:10)
4 error at Object.end (/Users/yucong02/baidu/erp-fe/edam-vendor/node_modules/pacote/node_modules/tar/lib/parse.js:416:21)
4 error at PassThrough.onend (_stream_readable.js:598:10)
4 error at Object.onceWrapper (events.js:254:19)
4 error at PassThrough.emit (events.js:164:20)
4 error at endReadableNT (_stream_readable.js:1054:12)
4 error at _combinedTickCallback (internal/process/next_tick.js:138:11)
Context
Your Environment
Executable | Version |
---|---|
lerna --version |
3.13.0 |
npm --version |
6.4.1 |
yarn --version |
1.9.4 |
node --version |
9.2.0 |
OS | Version |
---|---|
macOS Sierra | 10.12.3 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
npm-publish - npm Docs
npm-publish · a) a folder containing a program described by a package.json file; b) a gzipped tarball containing (a); c) a url that...
Read more >npm publish cannot replace existing tarball - node.js
(note: inline links disabled because I'm new) > ubuntu@udoo:~/projects/node/node_modules/ab-file-manager$ npm publish > npm http PUT ...
Read more >"unable to read .tar archive" error - Google Groups
First of all you can try skipping contents generation with -skip-contents flag to publish command. If you remove any file from aptly/pool directory,...
Read more >Create a tar.gz file from a different directory, tar must keep files ...
To archive the contents of foo , change to foo and tar the current directory: -C /some/dir/foo . . To archive the foo...
Read more >For the love of god, don't use .npmignore - Medium
npmignore to hide my test directory. What's worse is I probably have no idea this happened. npm publish doesn't show the files that...
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
In my CI environment, I’m getting a lot of errors during the npm pack stage inside the lerna publish command. It happens randomly, and it happens in different packages each time, but the error comes from tar and the minizlib library.
In this same environment, single threading the npm publish commands for each package in lerna updated, using the actual npm publish command never runs into this issue.
the issue happens inside tar / minizlib, but it only started happening in recent versions of lerna.
i know this isn’t helpful but this has been a really hard thing for me to trace down.
Hi Folks, it looks like this one was resolved, so closing