node
node copied to clipboard
`npm pack` crash in Node 23
Version
v23.0.0
Platform
Darwin ....local 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:44 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_X86_64 x86_64
same in CI
Ubuntu
22.04.5
LTS
Subsystem
No response
What steps will reproduce the bug?
nvm install 23
corepack enable
npm pack
How often does it reproduce? Is there a required condition?
it's only happening on Node 23.0.0. No such issues in Node 18, Node 20 and Node 22.
What is the expected behavior? Why is that the expected behavior?
it should pack
What do you see instead?
(node:9110) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
npm warn tarball tarball data for file:/.../ (null) seems to be corrupted. Trying again.
npm warn tarball tarball data for file:/.../ (null) seems to be corrupted. Trying again.
npm error code ENOENT
npm error syscall lstat
npm error path /Users/.../ist/index.cjs
npm error errno -2
npm error enoent ENOENT: no such file or directory, lstat '/.../ist/index.cjs'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: /Users/.../.npm/_logs/2024-10-16T18_41_11_606Z-debug-0.log
⚠️ what's interesting is that ist
is actually dist
— it's loosing the first letter of the directory name
Additional information
from package.json
:
"files": [
"dist",
"migration",
"*.md"
],
from .log
file:
0 verbose cli /Users/.../.nvm/versions/node/v23.0.0/bin/node /Users/.../.nvm/versions/node/v23.0.0/bin/npm
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/Users/.../.nvm/versions/node/v23.0.0/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/.../.npmrc
5 silly config load:file:/Users/.../.npmrc
6 silly config load:file:/Users/.../.nvm/versions/node/v23.0.0/etc/npmrc
7 verbose title npm pack
8 verbose argv "pack"
9 verbose logfile logs-max:10 dir:/Users/.../.npm/_logs/2024-10-16T18_41_11_606Z-
10 verbose logfile /Users/.../.npm/_logs/2024-10-16T18_41_11_606Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
14 warn tarball tarball data for file:/Users/.../ (null) seems to be corrupted. Trying again.
15 warn tarball tarball data for file:/Users/.../ (null) seems to be corrupted. Trying again.
16 verbose stack Error: ENOENT: no such file or directory, lstat '/Users/.../ist/index.cjs'
17 error code ENOENT
18 error syscall lstat
19 error path /Users/.../ist/index.cjs
20 error errno -2
21 error enoent ENOENT: no such file or directory, lstat '/Users/.../ist/index.cjs'
22 error enoent This is related to npm not being able to find a file.
22 error enoent
23 verbose cwd /Users/...
24 verbose os Darwin 23.6.0
25 verbose node v23.0.0
26 verbose npm v10.9.0
27 verbose exit -2
28 verbose code -2
29 error A complete log of this run can be found in: /Users/.../.npm/_logs/2024-10-16T18_41_11_606Z-debug-0.log