npm

npm install 安装依赖

npm run dev  编译js,css等

npm run production 优化

npm run watch-poll 监听(相当于前两句的合并)

npm verufy cache 清楚缓存

npm config set registry "https://registry.npmjs.com/"  设置npm的下载源

npm install --ignore-engines  忽略版本安装依赖

 

问题:

npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/react-is (over 30000ms)

Sounds like you have a slow connection. Try increasing the timeout from 30s to 60s by adding this to your .npmrc file:( C:\Users\Administrator\.npmrc)

timeout=60000

You could also try adding

prefer-offline=true

npm install时报以下错误

Error: EPERM: operation not permitted, unlink 'E:\phpstudy_pro\WWW\minisoapi2\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',


yarn install --ignore-engine  可以解决以上问题,前提是已经安装了yarn




npm安装时有报错问题可以到这里查看https://www.e-learn.cn/tag/npm-install

 

posted @ 2020-08-11 16:28  小林不会飞  阅读(351)  评论(0编辑  收藏  举报