Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm ci fails with ERR_FS_EISDIR for node_modules/.bin #6051

Closed
2 tasks done
justintoman opened this issue Jan 12, 2023 · 4 comments · Fixed by #6054
Closed
2 tasks done

[BUG] npm ci fails with ERR_FS_EISDIR for node_modules/.bin #6051

justintoman opened this issue Jan 12, 2023 · 4 comments · Fixed by #6054
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@justintoman
Copy link

justintoman commented Jan 12, 2023

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Can't npm ci if there's an existing .bin directory in node_modules

Expected Behavior

It deletes node_modules without crashing

Steps To Reproduce

Use this package.json

{
  "name": "npm-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "eslint": "^8.31.0"
  }
}
  • npm ci
  • npm ci
  • It fails the second time
npm ERR! code ERR_FS_EISDIR
npm ERR! syscall rm
npm ERR! path /Users/justintoman/code/npm-test/node_modules/.bin
npm ERR! errno 21
npm ERR! Path is a directory: rm returned EISDIR (is a directory) /Users/justintoman/code/npm-test/node_modules/.bin

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/justintoman/.npm/_logs/2023-01-12T21_14_19_211Z-debug-0.log

Environment

  • npm: 9.3.0
  • Node.js: 18.12.1
  • OS Name: MacOS Venture 13.1
  • System Model Name: Macbook Pro
  • npm config:
; node bin location = /Users/justintoman/.nvm/versions/node/v18.12.1/bin/node
; node version = v18.12.1
; npm local prefix = /Users/justintoman/code/npm-test
; npm version = 9.3.0
; cwd = /Users/justintoman/code/npm-test
; HOME = /Users/justintoman
; Run `npm config ls -l` to show all defaults.
@justintoman justintoman added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Jan 12, 2023
@burkel24
Copy link
Contributor

👍 also having this issue when running npm ci on circleci with v9.3.0. 9.2.0 runs clean on the same machine

@burkel24
Copy link
Contributor

PR with a fix here #6052

@iSuslov
Copy link

iSuslov commented Jan 13, 2023

+1 I'm surprised dev team doesn't have a test for it.

@jamesshaw1987
Copy link
Contributor

+1 I'm surprised dev team doesn't have a test for it.

Agreed. Added a PR (#6054) that adds a test to @burkel24's PR (#6052).

tpmcgowan added a commit to ministryofjustice/book-a-prison-visit-staff-ui that referenced this issue Jan 13, 2023
tpmcgowan added a commit to ministryofjustice/book-a-prison-visit-staff-ui that referenced this issue Jan 13, 2023
dhirajshettymoj added a commit to ministryofjustice/send-legal-mail-to-prisons that referenced this issue Jan 16, 2023
dhirajshettymoj added a commit to ministryofjustice/send-legal-mail-to-prisons that referenced this issue Jan 16, 2023
squaresmile added a commit to atlasacademy/apps that referenced this issue Jan 17, 2023
tpmcgowan added a commit to ministryofjustice/book-a-prison-visit-staff-ui that referenced this issue Jan 20, 2023
psoleckimoj pushed a commit to ministryofjustice/book-a-prison-visit-staff-ui that referenced this issue Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
4 participants