cordova ios build plugin无法恢复

我有1,5年前做的简单的cordova项目。 几个月前,我把它build立到Android,它的工作。

现在我尝试为iOS构build它,但cordova构buildios失败:

Discovered plugin "InAppBrowser" in config.xml. Adding it to the project Failed to restore plugin "InAppBrowser" from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on https://registry.npmjs.org/InAppBrowser Discovered plugin "Network Information" in config.xml. Adding it to the project Failed to restore plugin "Network Information" from config.xml. You might need to try adding it again. Error: Error: Invalid package.json Building project: /Users/user1/projectname/platforms/ios/projectname.xcworkspace 

Macbook,塞拉利昂,Xcode 8.1

npm version {npm:'3.10.9',ares:'1.10.1-DEV',http_parser:'2.7.0',icu:'57 .1',modules:'48',node:'6.9.2',openssl :'1.0.2j',uv:'1.9.1',v8:'5.1.281.88',zlib:'1.2.8'}

cordova版本6.5.0

在我的config.xml中说:

– >

我评论了第一个,但第二个不工作

你将需要更新插件到最新版本,因为我认为你最近一定要添加ios作为平台,插件将在1.5年前被添加。

所以这些插件必须在1.5年前被插入到插件目录中,并且必须是最新版本的。

你也必须更新你的cordova版本到最新。 你用下面的命令更新它

npm install -g cordova@latest

你可以在你的app目录下面的命令行下面的命令行中,获取插件的名字。

cordova plugins ls

记下所有的插件名称。 (例如,cordova-plugin-splashscreen)

通过下面的命令删除它们中的每一个。

cordova plugin rm cordova-plugin-splashscreen

全部删除后,再使用下面的命令添加它们。

cordova plugin add cordova-plugin-splashscreen