Skip to content

Node.js

official website

china official website

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

node-sass Mirror

node Mirror

NodeJSSupported node-sass versionNode Module
209.0+115
198.0+111
188.0+108
177.0+,8.0+102
166.0+93
155.0+,<7.088
144.14+,<9.083
134.13+,<5.079
124.12+,<8.072
114.10+,<5.067
104.9+,<6.064
84.5.3+,<5.057
sh
$ npm i node-sass@${VERSION} --sass_binary_site=https://cdn.npmmirror.com/binaries/node-sass/

nvm

NVM | Node 版本管理器

Linux

nvm-sh/nvm

sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Windows

coreybutler/nvm-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