Since v8, npm scripts fail executing
Open
Nobody has claimed this yet.
Bug
Needs Triage
Release 8.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
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
root@strike:~/strike# npm run build:frontend
> strike@0.0.1 build:frontend
> esbuild ./client/src/VotingApp.mjs --minify --bundle --format=esm --outfile=./src/public/bundle.js
sh: 1: esbuild: Permission denied
root@strike:~/strike# npm --version
8.5.4
Expected Behavior
root@strike:~/strike# npm run build:frontend
> strike@0.0.1 build:frontend /root/strike
> esbuild ./client/src/VotingApp.mjs --minify --bundle --format=esm --outfile=./src/public/bundle.js
src/public/bundle.js 73.4kb
⚡ Done in 57ms
root@strike:~/strike# npm -v
6.14.16
Steps To Reproduce
No response
Environment
- npm: 8.5.4
- Node.js: v14.18.1
- OS Name: Linux strike 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- System Model Name: ubuntu
- npm config:
npm config ls
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.14.16 node/v14.18.1 linux x64"
; node bin location = /usr/bin/node
; cwd = /root/strike
; HOME = /root
; "npm config ls -l" to show all defaults.
workaround
downgrading npm@6 fixes the problem
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce npm run build:frontend with npm 8.5.4 and compare it with npm 6.14.16, using the reported esbuild command and environment details as the starting point. Investigate why the command receives Permission denied; done means the script completes and produces src/public/bundle.js without requiring the npm downgrade workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100