2017-07-19 213 views
0

当运行npm install不匹配的版本发现[email protected]

npm ERR! code ETARGET 
npm ERR! notarget No matching version found for [email protected] 
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 [email protected]或不-g选项安装指定的版本。这一次仍然没有运气。 任何帮助,将不胜感激。

回答

0

所以我的同事建议加入这种依赖为package.json

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

添加这个,然后运行npm install固定我的问题。当错误指出它已被指定时,我认为这很奇怪。

相关问题