windows下安装node.js(M1电脑怎么安装旧版本的node.js)

开发的app需要使用旧版本的node.js, 比如node v10, v12

但是M1电脑的芯片是apple的, 所以兼容不了旧版本的

通过搜索知道了,可以通过下面的方法成功安装

If you have installed nvm using homebrew and trying to install the node using command nvm install <some_version>, you will face errors on apple silicon machines (ARM) until the node version is higher than 14. Node versions older than 15 does not work on apple silicon machines (ARM) because ARM architecture is not supported by node older versions. For anything under v15, you will need to install node using Rosetta 2.

1. How to open Terminal in Rosetta2 mode -> got to Application -> right click on terminal app -> get Info -> Select "Open using Rosetta" -> Restart Terminal

2. In Terminal, write -> arch -x86_64 zsh Now you will able to install any version of node (even multiple versions)

参考链接: https://stackoverflow.com/questions/67254339/nvm-install-node-fails-to-install-on-macos-big-sur-m1-chip

windows下安装node.js(M1电脑怎么安装旧版本的node.js)(1)

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页