【发布时间】:2014-10-20 15:59:08
【问题描述】:
我试图将 body-parser 安装到我的项目中,但出现错误:
npm install body-parser --registry http://registry.npmjs.org/
npm http 304 http://registry.npmjs.org/raw-body
npm ERR! error installing body-parser@1.0.2
npm ERR! Error: No compatible version found: raw-body@'>=1.1.2- <1.2.0-'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.1.0","0.1.1","0.2.0","1.0.0","1.0.1","1.1.0"]
我在 Ubunto 上使用 npm 1.1.4,节点 0.6.12。
【问题讨论】:
-
你是否安装了最新版本的 npm install body-parser
-
在我看来,您正在执行 npm install body-parser@1.0.2,它告诉 npm 专门安装 body parser 版本 1.0.2,然后您的日志显示 No compatible version found for 1.0.2因此,如果您执行 npm install body-parser,它将安装 github 上可用的最新版本。
-
我只是在做 npm install body-parser
-
然后检查 npm-debug-log 文件
-
它在哪里?
标签: node.js ubuntu express npm