前端
解决npm install慢的问题 npm更换淘宝国内源
星期五, 九月 30th, 2022 | 前端 | 没有评论
不推荐使用cnpm,貌似有小毛病.
1.更换成功taobao的数据源
npm config set registry https://registry.npm.taobao.org |
2.永久修改镜像源
$ npm config list # 其他查看配置的方式 $ npm config get globalconfig $ npm config ls -l 找到并打开配置文件:~/.npmrc 写入配置:registry=https://registry.npm.taobao.org |
3.验证设置是否成功
npm config get registry
# OR
npm info express |
4.重要提醒
不推荐通过cnpm 使用,会出现各种莫名的问题
前端项目package.json中dependencies和devDependencies包版本的说明
星期二, 五月 24th, 2022 | ajax, pagemaker, 前端 | 没有评论
1、dependencie 配置当前程序所依赖的其他包。
2、devDependencie 配置当前程序所依赖的其他包,比如一些工具之类的配置在这里
主要是^大版本不变,只更新后面的小版本,以防止不兼容的情况
"dependencies":{ "ace-builds": "^1.4.9", "antd": "^3.26.15", "axios": "^0.19.0", "bootstrap-datepicker": "^1.8.0" } "devDependencies": { "@babel/cli": "7.4.3", "@babel/core": "7.4.3", "@babel/plugin-proposal-class-properties": "7.4.0", "@babel/plugin-proposal-optional-chaining": "^7.9.0", "@babel/plugin-syntax-dynamic-import": "7.2.0" } |
^表示第一位版本号不变,后面两位取最新的
~表示前两位不变,最后一个取最新
*表示全部取最新
Search
相关文章
热门文章
最新文章
文章分类
- ajax (10)
- algorithm-learn (2)
- Android (6)
- as (3)
- computer (63)
- Database (30)
- disucz (4)
- enterprise (1)
- erlang (2)
- flash (5)
- golang (3)
- html5 (18)
- ios (4)
- JAVA-and-J2EE (181)
- linux (139)
- mac (10)
- movie-music (11)
- pagemaker (36)
- php (50)
- spring-boot (2)
- Synology群晖 (2)
- Uncategorized (6)
- unity (1)
- webgame (15)
- wordpress (33)
- work-other (2)
- 体味生活 (40)
- 前端 (2)
- 大数据 (8)
- 游戏开发 (9)
- 爱上海 (19)
- 读书 (4)
- 软件 (3)