-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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] Scoped packages no longer have bin files linked in package-lock or node_modules/.bin #3791
Comments
I'm seeing this as well for both npm 6.14.13 and 7.13.0. My package.json looks like: {
"name": "@codeshift/cli",
"version": "0.2.1",
"main": "dist/codeshift-cli.cjs.js",
"bin": {
"@codeshift/cli": "./bin/codeshift-cli.js",
"codeshift-cli": "./bin/codeshift-cli.js"
},
} Also broken with shorthand config {
"name": "@codeshift/cli",
"version": "0.2.1",
"main": "dist/codeshift-cli.cjs.js",
"bin": "./bin/codeshift-cli.js",
} |
What about npm 7.24? |
The same behavior |
It seems that this is not npm issue, but Gitlab |
If someone else can confirm this only affects gitlab, then the issue can be closed |
{ |
This seems to be the same as #4308 I'm going to close this to focus the conversation there, since I started some debugging there already. Thanks you all! |
Is there an existing issue for this?
Current Behavior
Somewhere between npm 6.14.13 and 7.13.0,
npm install
no longer installs bins from scoped packages intonode_modules/.bin/
. As such, npx fails to runmy-bin-name
and instead trys to download the bin name from the public npmjs registry. Occurs on the latest version of npm 7.24.1 too.I imagine however I have just missed some change in the documentation but I don't see anything in particular in the scope or bin sections..
Note I am using a private package on a private gitlab npm repository but I don't think that is related. I don't know any public packages with a scope and bin commands to test.
The bin property is also missing on the dependency in the package-lock.json file with
lockfileVersion: 2
Expected Behavior
The bin file should appear in
node_modules/.bin/my-bin-name
and the local applicationpackage-lock.json
usinglockfileVersion: 2
should contain thebin
property in the dependency json.npx my-bin-name
should succeed without triggering an erroneous download attempt.Steps To Reproduce
Use a node install manager (like
n
) to change between node and npm versions. i.e.Environment
The text was updated successfully, but these errors were encountered: