express是nodejs最常用的web server框架,执行
npm install express-generator -g
安装express脚手架时出现如下错误
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
解决方法
1>在电脑开始栏搜索并以管理员身份运行PowerShell
2>输入set-ExecutionPolicy RemoteSignedexpress douban
3>选A
4>输入get-ExecutionPolicy
5>安装淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
6>使用cnpm安装脚手架
cnpm install express-generator -g