Unable to install dev-dependency in node 0.10.x Error: No compatible version found:

Unable to install dev-dependency in node 0.10.x Error: No compatible version found:

我正在尝试 运行 一个节点版本为“0.10.x”且 npm 版本为“1.4.x”的旧节点项目。 我创建了一个节点版本为 0.10.9 和 npm 版本为 1.2.24

的 nodenv

该项目的开发依赖性为 "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年了,所以还是建议升级。

interesting/strange它认为没有兼容的版本,即使它确实给出了一个版本列表,包括一个应该兼容的版本。可能是由于使用像 1.2.24 这样的旧 NPM 版本导致的错误,因为这似乎是 reported before