简体   繁体   English

npm说我有未满足的请求依赖项

[英]npm says I have unmet request dependencies

I'm trying to install the express module: npm install -g express 我正在尝试安装快速模块: npm install -g express

The output shows: 输出显示:

root@Rx:~/node-v0.10.36# npm install -g express
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login requires request@'~2.9.202' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/request,
npm WARN unmet dependency which is version 2.42.0
express@4.11.1 /usr/local/lib/node_modules/express
├── merge-descriptors@0.0.2
├── utils-merge@1.0.0
├── methods@1.1.1
├── fresh@0.2.4
├── cookie@0.1.2
├── escape-html@1.0.1
├── range-parser@1.0.2
├── cookie-signature@1.0.5
├── finalhandler@0.3.3
├── vary@1.0.0
├── media-typer@0.3.0
├── parseurl@1.3.0
├── serve-static@1.8.1
├── content-disposition@0.5.0
├── path-to-regexp@0.1.3
├── depd@1.0.0
├── qs@2.3.3
├── on-finished@2.2.0 (ee-first@1.1.0)
├── debug@2.1.1 (ms@0.6.2)
├── etag@1.5.1 (crc@3.2.1)
├── proxy-addr@1.0.5 (forwarded@0.1.0, ipaddr.js@0.1.6)
├── send@0.11.1 (destroy@1.0.3, ms@0.7.0, mime@1.2.11)
├── accepts@1.2.3 (negotiator@0.5.0, mime-types@2.0.8)
└── type-is@1.5.6 (mime-types@2.0.8)

In fact it says this whenever I install things with -g 事实上,只要我用-g安装东西就会说这个

I tried npm install request and it seems successful but didn't fix the issue, so I tried npm install -g request with the same unmet dependency error. 我尝试了npm install request ,它似乎成功但没有解决问题,所以我尝试了npm install -g request具有相同的unmet依赖性错误。

This is a freshly compiled version of npm and nodejs from the official site. 这是来自官方网站的npm和nodejs的新编译版本。 Running latest debian. 运行最新的debian。 What's wrong here? 这有什么不对?

So, I'm not sure why this worked or which command did it but I ran these and it started working: 所以,我不确定为什么这个工作或者哪个命令做了,但我运行了这些并开始工作:

npm install -g npm npm update npm update -g npm install -g npm npm update npm update -g

I got the same dependency errors while I ran some of those so I'm not sure which fixed it but after trying to install express again, there were no errors. 当我运行其中的一些时,我得到了相同的依赖错误,所以我不确定是哪个修复它但是在尝试再次安装express之后,没有错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM