无法在节点0.10.x中安装dev依赖项错误:找不到兼容的版本:



我正在尝试运行一个节点版本为"的旧节点项目;0.10×;而npm版本为";1.4×;。我创建了一个nodenv,其节点版本为0.10.9,npm版本为1.2.24

该项目的开发依赖项为"load-grunt-tasks": "~0.6.0"

但是,当我尝试使用npm install load-grunt-tasks@~0.6.0安装npm时,我会收到以下错误:

npm ERR! Error: No compatible version found: multimatch@'^0.3.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","0.3.0","1.0.0","1.0.1","2.0.0","2.1.0","3.0.0","4.0.0","5.0.0"]
npm ERR!     at installTargetsError (/mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/env-0.10/lib/node_modules/npm/lib/cache.js:709:10)
npm ERR!     at /mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/env-0.10/lib/node_modules/npm/lib/cache.js:631:10
npm ERR!     at saved (/mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/env-0.10/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, 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! System Linux 4.4.0-19041-Microsoft
npm ERR! command "/mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/env-0.10/bin/node" "/mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/env-0.10/bin/npm" "install" "load-grunt-tasks@~0.6.0"
npm ERR! cwd /mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /mnt/c/Users/harsh/OneDrive/Documents/ONITO/software-services/hcare/OphthalmoCare-development/npm-debug.log
npm ERR! not ok code 0

或者有时依赖性错误被取代

npm ERR! Error: No compatible version found: findup-sync@'^0.1.2'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.1.2","0.1.3","0.2.0","0.2.1","0.3.0","0.4.0","0.4.1","0.4.2","0.4.3","1.0.0","2.0.0","3.0.0","4.0.0"]

load-grunt-tasks的0.6.0版本已经有7年的历史了,所以无论如何都建议升级它。

有趣/奇怪的是,它认为没有兼容的版本,尽管它确实给出了一个版本列表,包括一个应该兼容的版本。这可能是由于使用像1.2.24这样的旧NPM版本而导致的一个错误,因为这似乎之前已经报道过了。

相关内容

最新更新