Node.js
sh
$ npm config set cache /usr/software/node-v14.21.3-linux-x64/cache
$ npm config set prefix /usr/software/node-v14.21.3-linux-x64/prefix
$ npm config set registry https://registry.npmmirror.com/
Welcome to Node.js DEB repository
powershell
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs
nrm
sh
$ sudo npm i -g nrm
$ sudo npm i -g open@8.4.2
$ sudo ln -s /usr/software/node-v14.21.3-linux-x64/bin/nrm /usr/local/bin
yarm
sh
$ sudo npm i -g yarm
$ sudo ln -s /usr/software/node-v14.21.3-linux-x64/yarm /usr/local/bin/yarm
# window
# yarn.ps1 cannot be loaded because running scripts is disabled on this system.
# 1 run as administrator
window powershell
# 2
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
modules
node-sass
NodeJS | Supported node-sass version | Node Module |
---|---|---|
20 | 9.0+ | 115 |
19 | 8.0+ | 111 |
18 | 8.0+ | 108 |
17 | 7.0+,8.0+ | 102 |
16 | 6.0+ | 93 |
15 | 5.0+,<7.0 | 88 |
14 | 4.14+,<9.0 | 83 |
13 | 4.13+,<5.0 | 79 |
12 | 4.12+,<8.0 | 72 |
11 | 4.10+,<5.0 | 67 |
10 | 4.9+,<6.0 | 64 |
8 | 4.5.3+,<5.0 | 57 |
sh
$ npm i node-sass@${VERSION} --sass_binary_site=https://cdn.npmmirror.com/binaries/node-sass/
nvm
Linux
sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Windows
config
settings
node_mirror: https://npmmirror.com/mirrors/node/
npm_mirror: https://npmmirror.com/mirrors/npm/
nvm npm_mirror http://mirrors.cloud.tencent.com/npm/
nvm node_mirror http://mirrors.cloud.tencent.com/nodejs-release/
npm config set prefix
npm model 的指令执行时提示*.ps1
,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser