node.js - npm 依赖解析 - 或者 - 帮助!我无法安装 derbyjs

标签 node.js npm derbyjs

我一直在尝试安装 Derby,但 npm 一直坚持找不到合适的 Express 版本。这是我正在使用的命令:npm install -g derby。下面是输出。我正在运行 Ubuntu 11.10、node v0.7.6 和 npm v1.1.17。难道我做错了什么?我该如何解决这个问题?

npm ERR! Error: No compatible version found: express@'>=2.0.0- <3.0.0-'
npm ERR! Valid install targets:
npm ERR! ["0.14.0","0.14.1","1.0.0beta","1.0.0beta2","1.0.0rc","1.0.0rc2","1.0.0rc3","1.0.0rc4","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7"]
npm ERR!     at installTargetsError (/home/thomas/bin/node/lib/node_modules/npm/lib/cache.js:486:10)
npm ERR!     at next_ (/home/thomas/bin/node/lib/node_modules/npm/lib/cache.js:436:17)
npm ERR!     at next (/home/thomas/bin/node/lib/node_modules/npm/lib/cache.js:413:44)
npm ERR!     at /home/thomas/bin/node/lib/node_modules/npm/lib/cache.js:406:5
npm ERR!     at saved (/home/thomas/bin/node/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:151:7)
npm ERR!     at Object.oncomplete (/home/thomas/bin/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 3.0.0-17-generic
npm ERR! command "node" "/home/thomas/bin/node/bin/npm" "install" "-g" "derby"
npm ERR! cwd /home/thomas
npm ERR! node -v v0.7.6
npm ERR! npm -v 1.1.17
npm ERR! message No compatible version found: express@'>=2.0.0- <3.0.0-'
npm ERR! message Valid install targets:
npm ERR! message ["0.14.0","0.14.1","1.0.0beta","1.0.0beta2","1.0.0rc","1.0.0rc2","1.0.0rc3","1.0.0rc4","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7"]
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/thomas/npm-debug.log
npm not ok

最佳答案

Derby 需要express v2.x,而express v2.x 需要 Node v0.4.1 => 0.7.0-pre。这意味着 npm 将无法为您找到有效的 express 版本,因为您的 Node 版本 v0.7.6 不受支持。

最好的选择是降级 Node.js。您还可以手动安装express,并希望它实际上兼容,但这可能是一个坏主意。

关于node.js - npm 依赖解析 - 或者 - 帮助!我无法安装 derbyjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10202173/

相关文章:

node.js - 意外的 token =

node.js - NPM:更改 Node 模块的 `bin` 输出目录

node.js - create-react-app : The term 'create-react-app' is not recognized as the name of a cmdlet, 函数、脚本文件或可操作程序中存在问题

google-docs - derbyJS - 实时了解谁做出了更改

node.js - 用于 REST API 的 derbyjs

javascript - 如何使用 Browserify 实现 Synchronize.js?

node.js - 使用 PHP/MySQL/JS 进行类似 facebook 聊天的后端服务器软件?

node.js 读取 USB 端口信号

c# - 无法在不同机器上运行Appium

linux - 适用于 Windows 的 "Make"命令 - 可能的选项?