运行npm install
npm ERR! code ETARGET
npm ERR! notarget No matching version found for gulp-sourcemaps@1.7.0
npm ERR! notarget In most cases you or one of your dependencies are
requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'react-map-gl'
npm ERR! notarget
我尝试按npm install -g gulp-sourcemaps@1.7.0
或没有-g
选项安装指定的版本。这个还没有运气。
任何帮助将不胜感激。
答案 0 :(得分:0)
所以我的同事建议将依赖项添加到package.json
"react-map-gl": {
"version": "^1.2.0",
"dependencies": {
"gulp-sourcemaps": "^1.7.0"
}
},
添加此项,然后运行npm install
解决了我的问题。当错误表明已经指定时,我认为这很奇怪。