npm添加淘宝镜像并启动服务

来源:互联网 发布:迪达软件 编辑:程序博客网 时间:2024/06/09 18:59

0.下载node.js应用程序下载并安装 https://nodejs.org/en/

1.通过config命令

    npm config set registry https://registry.npm.taobao.org 

    npm info underscore (如果上面配置正确这个命令会有字符串response)

2.命令行指定

   npm --registry https://registry.npm.taobao.org info underscore 

3.编辑 ~/.npmrc 加入下面内容

   registry = https://registry.npm.taobao.org

4.编译 npm install

5.发布服务 npm run dev