我尝试为Linkedin设置离子2本机组件,如下所述:https://ionicframework.com/docs/v2/native/linkedin/
但是当我这样做时:
npm install --save @ionic-native/linkedin
我收到:
ionic-hello-world@ /home/gx/ionic2/linkTest
├── UNMET PEER DEPENDENCY @ionic-native/core@3.1.0
└── @ionic-native/linkedin@3.1.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @ionic-native/linkedin@3.1.1 requires a peer of @ionic-native/core@3.1.1 but none was installed.
这里我的环境信息:
Your system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v4.2.6
Xcode version: Not installed
我该怎么解决? THX
答案 0 :(得分:2)
您必须将ionic-native
版本更新为3.1.0
检查package.json here。
在package.json中添加条目"@ionic-native/core": "3.1.0",
并删除旧条目
现在运行npm install
。
清除node_modules
文件夹,如果它不起作用。
答案 1 :(得分:2)
Ionic团队发布了latest Ionic Native 3.x。因此,为了避免上述问题,您必须使用最新的CLI创建您的应用程序。换句话说,您必须创建新的V2项目。就是这样。祝您好运!
ionic start myfirstapp blank --v2