我正在一个项目中,其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)。