2017-07-19 132 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固定我的問題。當錯誤指出它已被指定時,我認爲這很奇怪。

相關問題