找不到与gulp-sourcemaps@1.7.0匹配的版本

时间:2017-07-19 05:50:20

标签: reactjs npm

运行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选项安装指定的版本。这个还没有运气。 任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

所以我的同事建议将依赖项添加到package.json

"react-map-gl": {
  "version": "^1.2.0",
  "dependencies": {
    "gulp-sourcemaps": "^1.7.0"
  }
},

添加此项,然后运行npm install解决了我的问题。当错误表明已经指定时,我认为这很奇怪。