NPM是否依赖于Gulp版本?

时间:2019-07-08 16:41:39

标签: npm npm-install package.json

我正在一个项目中,其package.json中包含以下内容:

"devDependencies": {
    "gulp": "git+https://github.com/gulpjs/gulp.git#4.0"
}

但是,在安装NPM时,这会导致pathspec did not match any file(s) known to git错误:

npm ERR! code 1
npm ERR! Command failed: git checkout 4.0
npm ERR! error: pathspec '4.0' did not match any file(s) known to git

我认为我们想要的是Gulp的4.0.0版本:https://github.com/gulpjs/gulp/releases/tag/v4.0.0。要获得此版本,commit-ish(紧随http://npm.github.io/using-pkgs-docs/package-json/types-of-dependencies.html之后)应该指定什么? (我的NPM版本为6.9.0)。

0 个答案:

没有答案