解决 no compatible version found: ionic-native@^3.5.0

npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/src/node-v6.10.3-linux-x64/bin/node" "/usr/src/node-v6.10.3-linux-x64/bin/npm" "install" "ionic-native"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: ionic-native@^3.5.0
npm ERR! notarget Valid install targets:
npm ERR! notarget 5.0.0-alpha.0, 2.9.0, 2.8.1, 2.8.0, 2.7.0, 2.6.0, 2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.2, 2.3.1, 2.3.0, 2.2.17, 2.2.16, 2.2.15, 2.2.14, 2.2.13, 2.2.12, 2.2.11, 2.2.10, 2.2.9, 2.2.8, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.3.27, 1.3.26, 1.3.25, 1.3.24, 1.3.23, 1.3.22, 1.3.21, 1.3.20, 1.3.19, 1.3.18, 1.3.17, 1.3.16, 1.3.15, 1.3.14, 1.3.13, 1.3.12, 1.3.11, 1.3.10, 1.3.9, 1.3.8, 1.3.7, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.12, 1.0.11, 1.0.10, 1.0.9, 1.0.8, 1.0.7
npm ERR! notarget 
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

旧项目从git服务器下载下来,运行npm install提示上面的错误信息. 错误信息的大概意思是 没有找到匹配的版本 ionic-native@^3.5.0

在提示信息中,没有 3.5.0,有 5.0.0-alpha.0,2.9.0 等版本

参考https://github.com/ionic-team/ionic-native/issues/1036#issuecomment-305456743  其中的做法,先安装 ionic-native 的指定版本,然后再运行npm install

如:

npm install ionic-native@2.9.0 --save
npm install 

 

如有类似的,应该也是同样的处理方法。

posted @ 2017-12-16 17:05  五毛钱的饼  阅读(1575)  评论(0编辑  收藏  举报