cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] `npm install` fails in my project since v7

Open ljharb opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

Clone https://github.com/ljharb/list-exports

run npm install.

see it fail.

Expected Behavior

It doesn't fail.

Steps To Reproduce

See above.

Environment

  • npm: v7 - v10.10
  • Node.js: irrelevant, but i was using v20.5.1
  • OS Name: Mac OS
  • System Model Name: Macbook Pro
  • npm config: not relevant, the only local config i have is package-lock=false in the npmrc file.

ljharb avatar Sep 16 '23 21:09 ljharb

Error output of an npm install on latest npm:

> [email protected] postinstall
> lerna bootstrap

lerna notice cli v3.22.1
notice filter excluding [".","list-exports-monorepo"]
info filter [ '!.', '!list-exports-monorepo' ]
lerna WARN bootstrap Installing local packages that do not match filters from registry
lerna info Bootstrapping 3 packages
lerna info Installing external dependencies
lerna ERR! npm install --no-save exited 190 in 'list-exports-tests'
lerna ERR! npm install --no-save stderr:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^16 || ^15 || ^14 || ^13 || ^12 || ^11 || ^10 || ^8 || ^6',
npm WARN EBADENGINE     npm: '>= 3'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v20.5.1', npm: '9.8.0' }
npm WARN EBADENGINE }
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path $PWD/packages/tests/node_modules/inquirer
npm ERR! dest $PWD/packages/tests/node_modules/.inquirer-Hz7MkCUV
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '$PWD/packages/tests/node_modules/inquirer' -> '$PWD/packages/tests/node_modules/.inquirer-Hz7MkCUV'

npm ERR! A complete log of this run can be found in: $HOME/.npm/_logs/2023-09-16T21_31_26_089Z-debug-0.log

ljharb avatar Sep 16 '23 21:09 ljharb

Any progress? Running into the same issue with the ENOTEMPTY error too.

And the solution is switching from v22 to v20.

I used the -f option.

The problematic node version is v22.4.1.

noscripter avatar Oct 16 '24 06:10 noscripter

Fixed in #7579, i believe.

ljharb avatar Apr 15 '25 22:04 ljharb