Skip to content

[BUG] Install fails if "bin" script doesn't exist #4597

@remcohaszing

Description

@remcohaszing

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

This is a duplicate of #2632. This has been closed, but I still encounter it using the latest version of npm.

When running npm install in a project that references a bin script that doesn’t exist, the command fails with the error:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/remco/Projects/appsemble/node_modules/@appsemble/server/dist/index.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/remco/Projects/appsemble/node_modules/@appsemble/server/dist/index.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Expected Behavior

npm install is succesful

Steps To Reproduce

git clone git@gitlab.com:appsemble/appsemble.git
cd appsemble
rm yarn.lock
npm install

Environment

  • npm: 8.5.5
  • Node.js: 16.14.2
  • OS Name: Pop!_OS
  • System Model Name:
  • npm config:
; "global" config from /home/remco/.local/etc/npmrc

fund = false 

; node bin location = /usr/bin/node
; cwd = /home/remco/Projects/appsemble
; HOME = /home/remco
; Run `npm config ls -l` to show all defaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions