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
Node 23.0.0 was released 2 days ago and broke hooks in this repository. The log I receive is the following:
An unexpected error has occurred: CalledProcessError: command: ('/home/stas/.cache/pre-commit/repo6fs1kess/node_env-default/bin/node', '/home/stas/.cache/pre-commit/repo6fs1kess/node_env-default/bin/npm', 'pack')
return code: 254
stdout: (none)
stderr:
(node:2233787) 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/stas/.cache/pre-commit/repo6fs1kess/ (null) seems to be corrupted. Trying again.
npm warn tarball tarball data for file:/home/stas/.cache/pre-commit/repo6fs1kess/ (null) seems to be corrupted. Trying again.
npm error code ENOENT
npm error syscall lstat
npm error path /home/stas/.cache/pre-commit/repo6fs1kess/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/stas/.cache/pre-commit/repo6fs1kess/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/stas/.npm/_logs/2024-10-18T16_37_40_681Z-debug-0.log
Check the log at /home/stas/.cache/pre-commit/pre-commit.log
NPM log is no more helpful. This is something related to node v23, and pre-commit defaults to using latest version. The problem is that npm pack works, while node npm pack for some reason does not, and pre-commit invokes the latter.
To reproduce (if this doesn't fail, try pre-commit clean prior to running this):
language_version can be overridden by end users, but it's expected that hooks work "out of the box", hence pinning language_version here would be very helpful. (to make it clear, this does not depend on system node installation, so won't be exposed to users directly in any way)
The text was updated successfully, but these errors were encountered:
Here's an upstream confirmation: already discovered in pre-commit/pre-commit#3339 and caused by nodejs/node#55410. Also good suggestion from that thread to use language_version: lts to avoid pinning to any specific release.
Node 23.0.0 was released 2 days ago and broke hooks in this repository. The log I receive is the following:
NPM log is no more helpful. This is something related to node v23, and
pre-commit
defaults to using latest version. The problem is thatnpm pack
works, whilenode npm pack
for some reason does not, and pre-commit invokes the latter.To reproduce (if this doesn't fail, try
pre-commit clean
prior to running this):Works:
language_version
can be overridden by end users, but it's expected that hooks work "out of the box", hence pinninglanguage_version
here would be very helpful. (to make it clear, this does not depend on systemnode
installation, so won't be exposed to users directly in any way)The text was updated successfully, but these errors were encountered: