You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some packages (especially privately hosted ones) fails when invoked by a script of another package. The error is always the same: 127 meaning command not found.
All of the private packages exposes a main.js which redirects to an index.js generated by tsc at package build time. I verified that both the index.js and main.js exists. Each private package.json has a bin entry mapping to the index.js file.
When the private package is installed by npm v6.14.9 everything is fine. When the private package is installed by npm v7.0.15 it's broken.
However packages like typescript tsc and webpack still works fine.
Expected Behavior:
No 127 error
Steps To Reproduce:
Create a private package exporting a bin entry pointing to an index.js which includes a main.js built by typescript tsc
Publish this package
Create an electron application and reference the private package as a dev dependency
Create a script that calls the private package exposed bin
Run npm install on the electron app
Run the npm script
Enjoy error 127
Environment:
Machine with npm v7
npm 7.0.15
docker node:latest image
Invoked by gitlab-ci
Hardware is very limited: 4 GB RAM Core i3 2.4 Ghz 2 Cores 4 Threads
Host machine is running debian 10
Machine with npm v6
npm 6.14.9
node 12.18.2
no docker
Core i7 3.7 Ghz 4 cores 8 threads 24 GB RAM
OS: Pop! OS 20.10
EDIT: I just confirmed: the exact identical same host machine configuration with gitlab-ci runner but node:lts instead of node:latest resolves all problems. Which means the problem is forcely related to node:latest docker image.
The text was updated successfully, but these errors were encountered:
What do you mean, "a script of another package"? Scripts are only runnable in the current package; binaries (the "bin" field) are what's runnable from installed packages.
@Yuri6037 can you try updating to the latest v7 (ex. npm i -g npm@7) - you may also need to update your lockfile via installing with npm v6 & then run install again with v7 (should fix/migrate your lockfile).
Closing due to inactivity. If this is still a problem with npm@7 please open a new ticket and follow the prompts to give as much information as possible to debug further.
Current Behavior:
Some packages (especially privately hosted ones) fails when invoked by a script of another package. The error is always the same: 127 meaning command not found.
All of the private packages exposes a main.js which redirects to an index.js generated by tsc at package build time. I verified that both the index.js and main.js exists. Each private package.json has a bin entry mapping to the index.js file.
When the private package is installed by npm v6.14.9 everything is fine. When the private package is installed by npm v7.0.15 it's broken.
However packages like typescript tsc and webpack still works fine.
Expected Behavior:
No 127 error
Steps To Reproduce:
Environment:
Machine with npm v7
Machine with npm v6
EDIT: I just confirmed: the exact identical same host machine configuration with gitlab-ci runner but node:lts instead of node:latest resolves all problems. Which means the problem is forcely related to node:latest docker image.
The text was updated successfully, but these errors were encountered: