配置cnpm

作者: 昵称已被使用_ | 来源:发表于2016-12-24 15:07 被阅读1106次

安装

  • 安装了nodejs就会自动安装npm,但是由于npm下载东西经常需要翻墙,所以我们用淘宝镜像cnpm代替npm
  • 如下图使用npm install -g cnpm --registry=https://registry.npm.taobao.org安装cnpm,
    通过npm安装cnpm
  • 上图使用的工具是Cmder,想知道更多点这里

常用命令

npm常用命令和cnpm常用命令是一样的

安装包
cnpm i <pkg>  或者 cnpminstall <pkg>  或者  cnpm i <pkg>@<version>  或者  cnpminstall <pkg>@<version>

卸载包
cnpm uninstall <name> 或者 cnpm uninstall <name>@[<version>]

查看当前项目下的包列表
cnpm ls

查看全局包列表
cnpm ls -g

清理缓存
cnpm cache clean

其他

要是想更深入学习npm,请看博客园这里
npm中文网
npm官网

相关文章

  • 配置cnpm

    安装 安装了nodejs就会自动安装npm,但是由于npm下载东西经常需要翻墙,所以我们用淘宝镜像cnpm代替np...

  • cnpm 配置

    1.你可以使用我们定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm: 2.或者你直接通过添加...

  • 创建Vue项目,配置router

    配置环境 Npm :用淘宝镜像 cnpm $ npm install -g cnpm --registry=htt...

  • vux开始使用

    文档手动配置使用 部分说的很全面。 cnpm install css-loader --save-dev cnpm...

  • jenkins 部署报错 记录

    一 、注册cnpm 报错 服务器上已经安装cnpm了,删除以下配置 最终配置 正常运行 ?其实之前一直在正常运行,...

  • ionic环境搭建

    SeuicHybridApp 安装cordova cnpm install -g cordova ionic 配置...

  • vconsole使用

    安装cnpm install vconsole 配置import VConsole from 'vconsole/...

  • node js npm cnpm setting

    //查看配置命令npm config ls -l//修改配置文件cnpm config set userconfi...

  • cnpm install配置代理

    公司是通过代理上网的 所有cnpm下载不了要配置代理命令如下 cnpm set proxy=http://prox...

  • vux配置和mint-ui配置

    vux的配置步骤如下: vux官方地址 一、用cnpm下载三个模块 1. cnpm install vux --s...

网友评论

  • 933eb44af2e3:FAILURE: Build failed with an exception.

    * What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
    2.14.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

    Error: cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

    * What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
    2.14.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

    打包出现这个错误是什么原因 弄了好久,搞不懂,求救
    933eb44af2e3:上面的步骤都是正常 执行这个 npm install -g cnpm --registry=https://registry.npm.taobao.org
    报这个错误
    C:\Users\Administrator>java -version
    java version "1.8.0_131"
    Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

    C:\Users\Administrator>javac -version
    javac 1.8.0_131

    C:\Users\Administrator>node -v
    v6.10.3

    C:\Users\Administrator>npm -v
    3.10.10

    C:\Users\Administrator>npm install -g cnpm --registry=https://registry.npm.taoba
    o.org
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
    node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cnpm" "--registry=https://re
    gistry.npm.taobao.org"
    npm ERR! node v6.10.3
    npm ERR! npm v3.10.10
    npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE

    npm ERR! unable to verify the first certificate
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR! <https://github.com/npm/npm/issues&gt;

    npm ERR! Please include the following file with any support request:
    npm ERR! C:\Users\Administrator\npm-debug.log

    求解决!!!
    933eb44af2e3:@小军617 没有啊
    昵称已被使用_:你硬盘满了?

本文标题:配置cnpm

本文链接:https://www.haomeiwen.com/subject/rnglvttx.html