-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Error started today for an npm install. #163
Comments
even we have faced the same error. |
Hey, could you please submit a repo where this happens? Thanks |
[INFO] Installing environment for https://github.com/alessandrojcm/commitlint-pre-commit-hook. |
Sorry but I meant a git repository that I can clone so I can debug the issue. |
We have this repo being invoked from pipeline existing which is present within a private repo. |
Ok gotcha, could you please then paste your pre-commit and commitlint config files?: |
exclude: "^$"
|
0 verbose cli /root/.cache/pre-commit/repok81ok20m/node_env-default/bin/node /root/.cache/pre-commit/repok81ok20m/node_env-default/bin/npm |
seeing the same thing with our repos today |
Hey we're facing the exact same error too |
OK I will check this ASAP, could anyone confirm if this happens with the previous release? |
Hi @alessandrojcm . The issue wasnt there for a day or so before the day i reported. This seems to be related to an npm package you are possibly using. Not sure of there was a new npm build that was updated which is something you are using. Observations:
|
Thanks @ameenrsherali, this hook hasn't really changed at all since the last release (which has some time ago already). Could you please add too the pre commit version that you're using? |
I see this with Context is a private repo, which currently pins to 3.8.0. |
Something related to the new release of node If you cd into the cwd reported in your debug logs (eg
|
It's possible that the root of the issue is pre-commit rather than this hook, as I mentioned this package doesn't really change beyond updating commitlint. I'll look into it when I get a chance. |
Node 23 was released 2 days ago (the time this started): 2024-10-16, Version 23.0.0 (Current), @RafaelGSS |
As a temporary workaround, could you use the language_version option to pin to Node 22? |
I managed to reproduce this, it is definitely due to the node version. Please pin your |
Apparently is a bug in Node 23 itself: nodejs/node#55410 ekalinin/nodeenv#371 pre-commit/pre-commit#3339 so we will have to wait for a fix there. In the meantime, use the workaround above. |
The The documentation of language_version says:
I had Node 16 on my system (with nvm) when this is broken, then I installed Node Isn't this contrary to what the above |
I've not used pre commit in a while, but as far as I understand it will install its own isolated environment regardless of what is installed on your system. |
That is correct it does install its own env and usually downloads the node locally. The temp solution resolves the issue. Closing this issue out. Thanks again. |
Thanks @ameenrsherali, I'm going to reopen this to track the upstream bugs. Will close once the workaround is not longer necessary. |
Sounds good. Thanks @alessandrojcm |
Thanks for tracking members. Here is our note: Currently our private repositories' hooks have same issues. Our cases are occurred in these hooks: yamllint, markdownlint-cli2, commitlint. Someone who have valid '22.9.0' node that is isolated in cache hook, are working well, but... after running 'pre-commit cache clean', has these cases are detected. So we decide to set that hooks disable temporaly until re-active. |
Running into the below issue with the commitlint-pre-commit-hook:
[INFO] Installing environment for https://github.com/alessandrojcm/commitlint-pre-commit-hook.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/vscode/.cache/pre-commit/repoz1f94nsb/node_env-default/bin/node', '/home/vscode/.cache/pre-commit/repoz1f94nsb/node_env-default/bin/npm', 'pack')
return code: 254
stdout: (none)
stderr:
(node:2699) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use
node --trace-warnings ...
to show where the warning was created)npm warn tarball tarball data for file:/home/vscode/.cache/pre-commit/repoz1f94nsb/ (null) seems to be corrupted. Trying again.
npm warn tarball tarball data for file:/home/vscode/.cache/pre-commit/repoz1f94nsb/ (null) seems to be corrupted. Trying again.
npm error code ENOENT
npm error syscall lstat
npm error path /home/vscode/.cache/pre-commit/repoz1f94nsb/ode_env-default/lib/node_modules/npm/node_modules/sprintf-js/dist/.gitattributes
npm error errno -2
npm error enoent ENOENT: no such file or directory, lstat '/home/vscode/.cache/pre-commit/repoz1f94nsb/ode_env-default/lib/node_modules/npm/node_modules/sprintf-js/dist/.gitattributes'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: /home/vscode/.npm/_logs/2024-10-16T17_40_56_462Z-debug-0.log
The text was updated successfully, but these errors were encountered: