我用git克隆一个项目,该项目是用离子2创建的,但当我执行命令重新创建node_modules文件夹时,我得到了这个错误.
npm install
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ionic-native@^3.5.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 'ionic-hello-world'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wihermes/.npm/_logs/2017-06-02T13_58_47_295Z-debug.log
Run Code Online (Sandbox Code Playgroud)
注意:我已经更新了npm.
有谁知道如何修理它?
Ole*_*vas 42
首先尝试删除package-lock.json文件
Pet*_*eid 31
您指定的版本或您指定的某个依赖项未发布到npmjs.com
执行npm view ionic-native(参见docs)为包版本返回以下输出:
versions:
[ '1.0.7',
'1.0.8',
'1.0.9',
'1.0.10',
'1.0.11',
'1.0.12',
'1.1.0',
'1.1.1',
'1.2.0',
'1.2.1',
'1.2.2',
'1.2.3',
'1.2.4',
'1.3.0',
'1.3.1',
'1.3.2',
'1.3.3',
'1.3.4',
'1.3.5',
'1.3.6',
'1.3.7',
'1.3.8',
'1.3.9',
'1.3.10',
'1.3.11',
'1.3.12',
'1.3.13',
'1.3.14',
'1.3.15',
'1.3.16',
'1.3.17',
'1.3.18',
'1.3.19',
'1.3.20',
'1.3.21',
'1.3.22',
'1.3.23',
'1.3.24',
'1.3.25',
'1.3.26',
'1.3.27',
'2.0.0',
'2.0.1',
'2.0.2',
'2.0.3',
'2.1.2',
'2.1.3',
'2.1.4',
'2.1.5',
'2.1.6',
'2.1.7',
'2.1.8',
'2.1.9',
'2.2.0',
'2.2.1',
'2.2.2',
'2.2.3',
'2.2.4',
'2.2.5',
'2.2.6',
'2.2.7',
'2.2.8',
'2.2.9',
'2.2.10',
'2.2.11',
'2.2.12',
'2.2.13',
'2.2.14',
'2.2.15',
'2.2.16',
'2.2.17',
'2.3.0',
'2.3.1',
'2.3.2',
'2.4.0',
'2.4.1',
'2.5.0',
'2.5.1',
'2.6.0',
'2.7.0',
'2.8.0',
'2.8.1',
'2.9.0' ],
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,没有比2.9.0已发布到npm存储库的版本更高的版本.奇怪的是,他们在GitHub上的版本高于此版本.我建议在这方面与维护者打开一个问题.
现在,您可以通过所需版本的tarball URL手动安装软件包:
npm install https://github.com/ionic-team/ionic-native/tarball/v3.5.0
Run Code Online (Sandbox Code Playgroud)
Bri*_*rij 21
我有一个可用的包的问题。强制清理缓存有帮助。
npm cache clean --force
Run Code Online (Sandbox Code Playgroud)
Lai*_*Xue 12
尝试删除"package-lock.json"并运行"npm install && npm update",它将安装最新版本并清除所有错误.
就我而言,我需要执行以下步骤:第一步已过时,因此可以跳过(最有可能)
npm cache clean --force
npm cache verify
npm uninstall yourPackage
npm uninstall -g yourPackage
Run Code Online (Sandbox Code Playgroud)
我的问题在这里描述
经过这些步骤后,应用程序已成功生成。
| 归档时间: |
|
| 查看次数: |
75462 次 |
| 最近记录: |