Skip to content
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

M1 architecture support - incorrect keymap #280

Closed
thclark opened this issue Feb 5, 2021 · 0 comments · Fixed by #282
Closed

M1 architecture support - incorrect keymap #280

thclark opened this issue Feb 5, 2021 · 0 comments · Fixed by #282

Comments

@thclark
Copy link

thclark commented Feb 5, 2021

I'm on an M1 mac, and the architecture key hasn't been added yet.

Error (which came via running pre-commit) was:

stderr:
     * Install prebuilt node (15.8.0) 
    Traceback (most recent call last):
      File "/Users/thc29/.pyenv/versions/3.9.1/lib/python3.9/runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/Users/thc29/.pyenv/versions/3.9.1/lib/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 1471, in <module>
        main()
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 1065, in main
        create_environment(env_dir, opt)
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 951, in create_environment
        install_node(env_dir, src_dir, opt)
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 716, in install_node
        install_node_wrapped(env_dir, src_dir, opt)
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 732, in install_node_wrapped
        node_url = get_node_bin_url(opt.node)
      File "/Users/thc29/.pyenv/versions/windquest/lib/python3.9/site-packages/nodeenv.py", line 532, in get_node_bin_url
        'arch': archmap[platform.machine()],
    KeyError: 'arm64'

There is a native build of node now available for M1 so shouldn't be too bad a fix, but, it's worth noting that there's some discrepancy on the architecture key. This morning I've seen both arm64 and arm64/v8, while I have it on good authority from an ARM principal engineer (it's nice to have friends in tech!) that it should strictly just be armv8 or armv8.4! So you could probably get away with arm64 on the basis of my error above, but just to save future hassle it might be worth mapping all of those.

Aside: I haven't yet worked out whether the redonculous speed of things like yarn install is worth all the bugs that have yet to be ironed out with this M1 architecture! As of Feb 2021, developers should expect several days of messing about...

@thclark thclark changed the title M1 map support - incorrect keymap M1 architecture support - incorrect keymap Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant