node命令集合
npm set registry https://registry.npm.taobao.org/
npm config set registry https://registry.npmjs.org/
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
npm get registry
//npm安装包的提示操作目录权限不足
npm config set unsafe-perm=true
npm config set python /usr/bin/python2
npm install
npm install cnpm
npm install --unsafe-perm node-sass
//清空缓存文件
npm cache clean --force
//跳过自签名证书验证
NODE_TLS_REJECT_UNAUTHORIZED=0 cnpm install
DEBUG=* cnpm run build:prod
nvm ls
nvm install v16.15.1
nvm use v16.15.1
nvm alias default v16.15.1
npm config set unsafe-perm=true
npm install
npm run build:prod
node-sass安装
npm config set python /usr/bin/python2
npm install --unsafe-perm node-sass
静默强制覆盖 不需要输入y确认
\cp -f -r * /var/lib/jenkins/workspace/test-55-h5/node_modules/
解决示例
标签:npm,node,set,nodejs,实例,registry,install,config,打包 From: https://www.cnblogs.com/yxh168/p/18076823