模块没有导出成员'IonicNativePlugin',Ionic2 [英] Module has no exported member 'IonicNativePlugin', Ionic2

查看:443
本文介绍了模块没有导出成员'IonicNativePlugin',Ionic2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将相机,文件,文件路径和传输插件工作,我收到这些错误,

I am trying to get camera, file, filepath and transfer plugin working and I am getting this error for each of these,

Module 'node_modules/@ionic-native/core/index' has no exported member 'IonicNativePlugin'

我得到了最新的Ionic2版本。

I got the latest Ionic2 version.

按要求提供package.json文件

package.json file as requested

"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/camera": "^3.6.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/file": "^3.6.0",
"@ionic-native/file-path": "^3.6.0",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@ionic-native/transfer": "^3.6.0",
"@ionic/storage": "2.0.1",
"crypto-js": "3.1.9-1",
"fast-sha256": "1.0.0",
"ionic-angular": "3.0.1",
"ionic-native": "^3.5.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sha256": "0.2.0",
"sw-toolbox": "3.4.0",
"ts-md5": "1.2.0",
"zone.js": "^0.8.4"

devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1"

"cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "ionic-plugin-keyboard",
    "cordova-plugin-splashscreen"

"cordovaPlatforms": [],
  "description": "Work: An Ionic project"

我错过了什么?

推荐答案

我找到了解决方案,IonicNativePlugin被添加到更新版本的离子原生中/ core,所以我必须卸载这个并安装最新的3.6.1,而不是w插件已导出,一切正常。

I have found the solution, IonicNativePlugin was added in newer version of ionic-native/core, so I had to uninstall this one and install the newest one which is 3.6.1, and now plugin got exported and everything works fine.

这篇关于模块没有导出成员'IonicNativePlugin',Ionic2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆