当前位置:网站首页>NPM module removal_ [solved] after NPM uninstalls the module, the module is not removed from package.json [easy to understand]
NPM module removal_ [solved] after NPM uninstalls the module, the module is not removed from package.json [easy to understand]
2022-07-25 20:58:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Toss about :
period , There is a strange phenomenon :
use npm remove xxx or npm uninstall xxx after
xxx Not from package.json Removing the :* HeadquarterReport git:(permission-control) * npm remove element-ui
– [email protected] node_modules/async-validator
– [email protected] node_modules/babel-helper-vue-jsx-merge-props
– [email protected] node_modules/deepmerge
– [email protected] node_modules/throttle-debounce
– [email protected] node_modules/element-ui
npm WARN [email protected] No repository field.
Results found :
package.json
Configuration in :
“element-ui”: “1.4.3”,
Did not actively delete :
So install a new :* HeadquarterReport git:(permission-control) * npm install element-ui
[email protected] /Users/crifan/dev/dev_root/xxx
npm WARN [email protected] No repository field.
The results are 1.4.3
after npm uninstall package.json not update
Seems to add :-S, –save Parameters can be updated package.json?
-》 No parameters have been added before , Why can I update ?
Try again :* HeadquarterReport git:(permission-control) * npm uninstall element-ui -S
npm WARN [email protected] No repository field.
Sure enough, it's really updated package.json, Removed element-ui 了 .
【 summary 】
npm uninstall/remove xxx
It cannot be automatically updated package.json, hold xxx from
dependencies
devDependencies
optionalDependencies
Removing the .
Only by adding corresponding parameters :-S, –save:dependencies
-D, –save-dev:devDependencies
-O, –save-optional:optionalDependencies
such as :
npm uninstall element-ui -S
You can uninstall element-ui At the same time , Take it from dependencies Deleted from .
【 Postscript 】
Later adopted npm install when , It turns out that there is no update package.json:* HeadquarterReport git:(permission-control) * npm install element-ui
[email protected] /Users/crifan/dev/xxxx
npm WARN [email protected] requires a peer of [email protected]^2.5.2 but none was installed.
npm WARN [email protected] No repository field.
Didn't put element-ui add .
after npm install package.json not update
It seems that parameters must also be added , Can only be ?
Then try again :* HeadquarterReport git:(permission-control) * npm install element-ui –save
[email protected] /Users/crifan/dev/xxx
npm WARN [email protected] requires a peer of [email protected]^2.5.2 but none was installed.
npm WARN [email protected] No repository field.
Sure enough package.json It's been updated ,dependencies Combined with the :
“element-ui”: “^2.0.1”,
【 summary 2】
Seems to be :
npm install/uninstall xxx yes , It's just installation / Uninstall the corresponding module
Just add :
–save
–save-dev
Equal parameter , Only then can the corresponding module version be required , Add to / Delete the package.json in .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/127685.html Link to the original text :https://javaforall.cn
边栏推荐
- Google guava is just a brother. What is the real king of caching? (glory Collection Edition)
- 测试用例和缺陷报告模板
- Canvas 填充渐变
- 一道golang中关于接口和实现的面试题
- How to choose a microservice registration center?
- mysql导入数据时已改成csv utf8文件且文件名为英文,为什么还是导入失败
- 476-82(322、64、2、46、62、114)
- 【FiddlerTX插件】使用Fiddler抓包腾讯课堂视频下载(抓不到包解决方案)
- How to obtain the subordinate / annotation information of KEGG channel
- [matlab] download originality documents based on oil monkey script and MATLAB
猜你喜欢

Miscellaneous notes -- a hodgepodge

Cesium polygon gradient texture (canvas)

How to realize reliable transmission with UDP?

Online random coin tossing positive and negative statistical tool

Pycharm跑程序时自动进入测试模式

Pychart automatically enters the test mode when running the program

Illustration leetcode - 3. longest substring without repeated characters (difficulty: medium)

preprocessor directives

黑盒(功能)测试基本方法

Step num problem
随机推荐
Question and answer 47: geeks have an appointment - the current monitoring system construction of CSC
leetcode-146:LRU 缓存
Jmeter分布式压测
Decompile app
Leetcode-6127: number of high-quality pairs
The onnx model is exported as a TRT model
wokerman 自定义写入日志文件
作为测试,如何理解线程同步异步
Remote—实战
Success factors of software R & D effectiveness measurement
Recommend a website that converts curl commands into PHP code & a website that initiates and executes curl requests online
leetcode-6126:设计食物评分系统
一道golang中关于map的并发读写的面试题
[workplace rules] it workplace rules | poor performance
图片怎么存储到数据库里「建议收藏」
Leetcode-114: expand binary tree into linked list
leetcode-114:二叉树展开为链表
Temperature and humidity environment monitoring system based on stm32
结构体,枚举类型与联合体
使用oap切面导致controller被重复调用