-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
v0.10.54 release breaks package installation #109
Comments
Here is the commit that broke installs: 28de285 |
👍 Build broken. Understand and appreciate the sentiment behind what you're doing, but please test your stuff before breaking everyone's CI/CD pipelines. |
@marshall007 @marksteele can you elaborate on why exactly you assume that it breaks package installation? You can confirm here, that v0.10.54 is perfectly fine: It has all the modules, and there's |
@medikoo The published NPM package is 0 bytes: #108 (comment). |
@medikoo that is the command I am running to reproduce the issue. For what it's worth I am on |
It's definitely not the case. Are you sure you're relying on a legit npm registry mirror? Again you can easily confirm on the content of published |
Note, also that if that would be the case. It'll be mayhem already (this package has 10+ million downloads per week). It's over 1 hour after release, and you're the only reporter of the issue :) |
@medikoo we are not relying on a registry mirror. Most folks probably have this dependency pinned in their All of the builds on GitLab's public handbook have been failing this morning. You can see that here for example: https://gitlab.com/gitlab-com/www-gitlab-com/-/jobs/2173245711 I confirmed this was an issue locally, nothing specific to our CI environment. Please make sure you do not have a local copy of your package cached and try to run |
@marshall007 again you're the only person reporting the issue, and we can see in various remote sources, that package publication is perfectly fine.
It looks there's some issue with your setup, and I cannot really do much about it |
@medikoo I haven't tested on the latest version of I can confirm the package is not zero bytes, so I agree that is not the issue. It appears to be a node version inconsistency. Try running: $ docker run -it node:12 "/bin/bash"
root@c25867fc0684:/# npx sass-lint
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module '/root/.npm/_npx/8/lib/node_modules/sass-lint/node_modules/es5-ext/_postinstall.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-07T21_18_28_716Z-debug.log
Install for [ 'sass-lint@latest' ] failed with code 1 |
@marshall007 I don't see how Installations with node.js v12 also work perfectly fine: |
I think the problem on older node versions is inside Docker where
With a ╰─>$ docker run --rm -it node:12 bash
root@a068395a1032:/# npm -v
6.14.4
root@a068395a1032:/# npx sass-lint -V
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module '/root/.npm/_npx/46/lib/node_modules/sass-lint/node_modules/es5-ext/_postinstall.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-07T21_20_21_093Z-debug.log
Install for [ 'sass-lint@latest' ] failed with code 1
root@a068395a1032:/# npm config set unsafe-perm true
root@a068395a1032:/# npx sass-lint -V
1.13.1 Since we do Note: newer versions work ~fine: ╰─>$ docker run --rm -it node:16 bash
root@9fb9485b56a7:/# npm -v
8.3.1
root@9fb9485b56a7:/# npx sass-lint -V
Need to install the following packages:
sass-lint
Ok to proceed? (y) y
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
1.13.1 |
It's published as executable file, but still that's not needed for One thing it misses (for an executable file) is shebang (I'll add it now), but as it's invoked via |
@medikoo I agree that the file permissions being executable should not matter. I think it might be that the Notice that in the npm error logs you see this line indicating the arguments that were passed when executing the postinstall script:
So if we try to run this directly from within the
In other words, I think it seems to be interpreting the entire string |
Issue lies in |
workaround for npx scripts: disable post install scripts |
@marshall007 I've looked more closely to See: https://github.com/npm/npm-lifecycle/blob/v3.1.5/index.js#L322-L324 By default in non windows environment it's It appears in your case shell is customized (see https://github.com/npm/npm-lifecycle/blob/v3.1.5/index.js#L291-L304) |
@medikoo even with |
@gilelias if you observe issue via |
@medikoo The issue is npx. (https://npm.community/t/npx-crashes-on-postinstall-script/9360.html). npx is deprecated. the solution is to use npm cli instead. |
@gilelias great thanks for clarifying this. @marshall007 can we close this report? |
I am experiencing a build break in my CI/CD environment due to the new Our builds fail when trying to install The error in our builds:
Here is the dependency tree for
Update: The workaround to use |
One quick solution is to use $ npm shrinkwrap |
I found that core-js had the same problem in the past: I created a PR with the same approach to prevent npx fails. |
Thanks to @martindrq finding, the issue should be gone starting with v0.10.57 version 🎉 |
This module is a dependency for many other popular modules and has broken some of our lint jobs in CI. For example, commands like this one using
npx
are now failing:/cc @medikoo
The text was updated successfully, but these errors were encountered: