美文网首页
npm命令笔记

npm命令笔记

作者: 爱笑的疯小妞 | 来源:发表于2018-12-07 10:30 被阅读0次

查看配置文件路径

$ npm config get userconfig//用户配置
$ npm config get globalconfig//全局配置

查看设置

$ npm config  ls
$ npm config  ls -l

删除代理

$ npm config delete proxy
$ npm config delete https-proxy

设置代理

$ npm config set proxy http://server:port
$ npm config set https-proxy http://server:port
$ npm config set proxy http://username:password@server:port
$ npm config set https-proxy http://username:pawword@server:port

install依赖包

$ npm install express
$ npm install express -g

update依赖包

$ npm update 
$ npm update express
$ npm update express -g

uninstall依赖包

$ npm uninstall express

其他命令

npm -v 
npm list 

关于node版本更新
对于window用户--重新安装覆盖
对于mac用户

$ node -v
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
//$ sudo  n v9.2.0
$ node -v
$ which node

相关文章

  • npm命令笔记

    查看配置文件路径 查看设置 删除代理 设置代理 install依赖包 update依赖包 uninstall依赖包...

  • NPM命令

    NPM 控制命令 NPM 包管理命令 一个很好玩的命令

  • npm 与 yarn 的cache

    npm 缓存命令 npm cache 提供了三个命令,分别是npm cache add, npm cache cl...

  • npm

    1. windows -g 全局安装 更新 npm npm install npm -g 基础命令 list 命令...

  • lerna+ git + npm

    lerna 命令 git 命令 npm命令

  • npm 与 yarn 命令对比

    ### npm 与 yarn 命令对比 |npm|yarn| |---|---| |npm install ...

  • npm和yarn包管理器

    简单的,随笔记录。down了一个项目,看read如何运行,发现是采用yarn命令~yarn命令难道是和npm...

  • npm 淘宝镜像的安装(不使用cnpm)

    通过命令配置 命令 npm config set registry https://registry.npm.ta...

  • npm 包部署资料

    查看npm镜像地址 同步npm包命令 npm 登录

  • React-Native学习笔记

    RN笔记 一. 常用命令 比如我们希望查看RN的所有历史版本,可以在命令行中输入: npm view react-...

网友评论

      本文标题:npm命令笔记

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