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

[BUG]: Compatible with M1 mac below Node.js 16.0.0 #113

Closed
kuroimachi opened this issue Mar 14, 2024 · 18 comments · Fixed by version-fox/version-fox-plugins#30
Closed

[BUG]: Compatible with M1 mac below Node.js 16.0.0 #113

kuroimachi opened this issue Mar 14, 2024 · 18 comments · Fixed by version-fox/version-fox-plugins#30
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers plugin Plugin-related issues question Further information is requested

Comments

@kuroimachi
Copy link

VersionFox version 0.2.4
1710416351958

@kuroimachi kuroimachi added the question Further information is requested label Mar 14, 2024
@kuroimachi
Copy link
Author

kuroimachi commented Mar 14, 2024

旧项目需要用到v12 v14版本

@eryajf
Copy link

eryajf commented Mar 14, 2024

+1,把nvm卸载了,结果发现vfox安装不了🤣

@aooohan
Copy link
Member

aooohan commented Mar 14, 2024

image

没什么问题, 检查一下你们的网行不行。 或者换nodejs/npmmirror

@kuroimachi
Copy link
Author

image image

都没用,其他java maven都可以下载,只有nodejs的两个插件nodejs或者npmmirror不管走不走代理都下载不了,16版本以上可以下载。有手动下载版本通过命令安装的方式吗?

@kuroimachi
Copy link
Author

发现了 windows可以 但是macos不行

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

image

@kuroimachi 我macos 也可以啊..... 你卸载插件重新装...

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

@kuroimachi 你是什么架构, 会不会是node低版本没有你这个架构的二进制包啊

@kuroimachi
Copy link
Author

image image 我是从nvm sdkman切换过来的,nvm16 14 12都能安装使用

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

image

@kuroimachi 我刚看了一下, 确实没有arm, nvm能安装? 用了什么魔法吗哈哈哈哈, 能截图一下nvm 安装arm 12.9.0的图吗

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

详见: nvm-sh/nvm#2350

摘自: https://github.com/nvm-sh/nvm/blob/81fc05684de8b0b13aed401de64733e1d5d23a9a/README.md#troubleshooting-on-macos

Note For Macs with the M1 chip, node started providing arm64 arch darwin packages since v16.0.0. For earlier versions, there were only darwin_x64 packages available but no darwin_arm64. If you are facing issues installing node using nvm, you may want to update to v16 or later.

看了一下, 和vfox问题一样, 只不过nvm做了些处理. 直接下载的x86. 笑死了

https://github.com/nvm-sh/nvm/blob/81fc05684de8b0b13aed401de64733e1d5d23a9a/nvm.sh#L2098-L2101

  if nvm_version_greater '16.0.0' "${VERSION}"; then
    if [ "_${NVM_OS}" = '_darwin' ] && [ "${NVM_ARCH}" = 'arm64' ]; then
      NVM_ARCH=x64
    fi

@aooohan aooohan added bug Something isn't working enhancement New feature or request labels Mar 15, 2024
@aooohan aooohan changed the title nodejs 12 14版本都无法安装 [BUG]: Compatible with M1 mac below Node.js 16.0.0 Mar 15, 2024
@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

@kuroimachi 可以先临时这么处理, nvm-sh/nvm#2350 (comment), 下个Node插件版本修复

@aooohan aooohan added the good first issue Good for newcomers label Mar 15, 2024
@kuroimachi
Copy link
Author

哈哈 感谢感谢

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

@kuroimachi 感兴趣的话可以提个PR, 我看了一下, 两行代码就能搞定.... 😄

@aooohan aooohan added the plugin Plugin-related issues label Mar 15, 2024
@kuroimachi
Copy link
Author

@aooohan
Copy link
Member

aooohan commented Mar 15, 2024

@kuroimachi 感谢贡献, 直接vfox update nodejs就可以用了

@bytemain
Copy link
Member

nvm 还有一个很厉害的功能, nvm install -s 14,可以在 arm 机器上下载 node 源码然后编译安装。

@kuroimachi
Copy link
Author

nvm 还有一个很厉害的功能, nvm install -s 14,可以在 arm 机器上下载 node 源码然后编译安装。

上面源码说了 低版本直接按照windows版本下载的🤣

@bytemain
Copy link
Member

bytemain commented Mar 19, 2024

nvm 还有一个很厉害的功能, nvm install -s 14,可以在 arm 机器上下载 node 源码然后编译安装。

上面源码说了 低版本直接按照windows版本下载的🤣

加上 -s 这个参数

CleanShot 2024-03-19 at 15 04 24@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers plugin Plugin-related issues question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants