(cnpm全局配置搭建dva-cli脚手架&)
cnpm全局配置搭建dva-cli脚手架&
第一步删除npm配置
npm config set proxy http://10.0.5.99:80
npm config set https-proxy http://10.0.5.99:80
npm config delete proxy
npm config delete https-proxy
npm install dva-cli -g
第二步安装cpm,全局安装dva-cli与http-server
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
npm install dva-cli -g -registry=https://registry.npm.taobao.org
npm install http-server -g -registry=https://registry.npm.taobao.org
http-server -p 8881
npm i roadhog -g -registry=https://registry.npm.taobao.org
npm install antd babel-plugin-import --save -registry=https://registry.npm.taobao.org
dva new demo-web
npm install -g cnpm -registry=https://registry.npm.taobao.org
第三步,启动dva-cli工程,增设配置,启动umi项目
cnpm install antd babel-plugin-import --save
cnpm install webpack --save-dev
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ npm config set registry https://registry.npm.taobao.org
npm install --save dva dva/router umi/link umi/withRouter
标签:npm,cli,cnpm,dva,taobao,registry,https,org From: https://blog.51cto.com/u_11837698/6081840