一、更换成淘宝的源
npm config set registry https://registry.npm.taobao.org
验证是否更换成功
npm config get registry – 或npm info express
二、以管理员身份打开cmd,并运行如下命令
npm install -g live-server
三、验证live-server是否安装成功
在静态资源的目录下运行命令live-server,如出现如下,则说明安装成功
D:\learn\platform\meiduo_learn\front_end_pc>live-server Serving "D:\learn\platform\meiduo_learn\front_end_pc" at http://127.0.0.1:8080 Ready for changes GET /favicon.ico 404 5.730 ms - 150
效果:
标签:npm,windows,server,live,registry,learn,安装 From: https://www.cnblogs.com/Durant0420/p/17583744.html