我尝试为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
我该如何解决?
将ionic-native
版本更新为3.1.0
在此处查看package.json。将条目"@ionic-native/core": "3.1.0",
添加到 package.json 并删除旧条目。
现在运行npm install
.清除node_modules
文件夹(如果不起作用(。
团队发布了最新的 Ionic Native 3.x。因此,为了避免上述问题,您必须使用最新的 CLI.In 其他词来创建您的应用程序,您必须创建新的 V2 项目。就是这样。祝你好运!
ionic start myfirstapp blank --v2