Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

pre-commit-config.yml : upgrade node to 17.2 #708

Closed
jcdrubay opened this issue Jun 14, 2022 · 0 comments
Closed

pre-commit-config.yml : upgrade node to 17.2 #708

jcdrubay opened this issue Jun 14, 2022 · 0 comments

Comments

@jcdrubay
Copy link
Contributor

Is your feature request related to a problem?
Yes, I cannot run pre-commit on my laptop (Mac with M1) with the default pre-commit-config.yaml file as node=14.18.0 is not supported.
As a workaround, I switch node to version 17.2.0 manually, then run pre-commit, then switch back to previous version 14.18.
This makes every of my few OCA contributions a bit more tedious.

Describe the solution you'd like
Upgrade note to 17.2.0 in pre-commit.yaml.

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 027473052bb..2a27b5e423d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,7 +16,7 @@ exclude: |
   (LICENSE.*|COPYING.*)
 default_language_version:
   python: python3
-  node: "14.18.0"
+  node: "17.2.0"
 repos:
   - repo: local
     hooks:

Error message without change

      File "/opt/homebrew/lib/python3.9/site-packages/nodeenv.py", line 721, in install_node
        install_node_wrapped(env_dir, src_dir, opt)
      File "/opt/homebrew/lib/python3.9/site-packages/nodeenv.py", line 743, in install_node_wrapped
        download_node_src(node_url, src_dir, opt)
      File "/opt/homebrew/lib/python3.9/site-packages/nodeenv.py", line 570, in download_node_src
        dl_contents = io.BytesIO(urlopen(node_url).read())
      File "/opt/homebrew/lib/python3.9/site-packages/nodeenv.py", line 606, in urlopen
        return urllib2.urlopen(req)
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
        return opener.open(url, data, timeout)
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
        response = meth(req, response)
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
        response = self.parent.error(
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
        return self._call_chain(*args)
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
        result = func(*args)
      File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 404: Not Found

Check the log at /Users/jc/.cache/pre-commit/pre-commit.log

Note

I have been running pre-commit extensively with node version 17.2 for several months and with a configuration which is 99% the same as for OCA without facing any issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants