Google maps Can';t更新至cordova ios的最新版本

Google maps Can';t更新至cordova ios的最新版本,google-maps,cordova,ionic-framework,npm,cordova-ios,Google Maps,Cordova,Ionic Framework,Npm,Cordova Ios,我的应用程序由爱奥尼亚和科尔多瓦构建,包括谷歌地图2.6.2版(最新版本)插件,但已经有一个月没有在iOS上加载了,安卓系统仍然可以工作 我只从一位同事那里买过这个产品,我对Cordova、Ionic和npm完全是初学者。在任何情况下,错误是插件不再安装(正如我的控制台在xCode中告诉我的那样)。当我尝试将Cordova ios更新为最新版本(ionic Cordova platform update ios)时,只会收到错误消息 > cordova platform update io

我的应用程序由爱奥尼亚和科尔多瓦构建,包括谷歌地图2.6.2版(最新版本)插件,但已经有一个月没有在iOS上加载了,安卓系统仍然可以工作

我只从一位同事那里买过这个产品,我对Cordova、Ionic和npm完全是初学者。在任何情况下,错误是插件不再安装(正如我的控制台在xCode中告诉我的那样)。当我尝试将Cordova ios更新为最新版本(ionic Cordova platform update ios)时,只会收到错误消息

> cordova platform update ios
Using cordova-fetch for cordova-ios@^5.0.0
Failed to fetch platform cordova-ios@^5.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name / version / URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN @ ionic-native / google-maps @ 3.10.3 requires a peer of @ ionic-native / core @ ^ 3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ ngx-translate / core @ 9.1.1 requires a peer of @angular / core @> = 5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package @ types / node is included as both a dev and production dependency.

npm ERR! path /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! code EEXIST
npm ERR! Refusing to delete /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: is outside /path/to/app/node_modules / cordova-ios / node_modules / ios-sim and not a link
npm ERR! File exists: /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! Move it away, and try again.

npm ERR! A complete log of this can be found in:
npm ERR! /path/to/app/.npm/_logs/2019-05-23T06_41_36_667Z-debug.log
[ERROR] An error occurred while running subprocess cordova.
        
        cordova update ios exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
这到底是什么意思?我想卸载iOS平台(ionic cordova platform remove iOS)并添加新平台(cordova platform add)ios@5.0.0),但卸载时已出现以下错误:

ionic cordova platform remove ios
> cordova platform remove ios --save
Removing ios from cordova.platforms array in package.json
Error: npm: Command failed with exit code 1 Error output:
npm WARN @ionic-native/google-maps@3.10.3 requires a peer of @ionic-native/core@^3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngx-translate/core@9.1.1 requires a peer of @angular/core@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package @types/node is included as both a dev and production dependency.

npm ERR! path /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! code EEXIST
npm ERR! Refusing to delete /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: is outside /path/to/app/node_modules/cordova-ios/node_modules/ios-sim and not a link
npm ERR! File exists: /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /path/to/app/.npm/_logs/2019-05-23T07_05_52_055Z-debug.log
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/superspawn.js:125:23)
    at ChildProcess.emit (events.js:196:13)
    at maybeClose (internal/child_process.js:1011:16)
    at Socket.<anonymous> (internal/child_process.js:416:11)
    at Socket.emit (events.js:196:13)
    at Pipe.<anonymous> (net.js:586:12) {
  stderr: 'npm WARN @ionic-native/google-maps@3.10.3 requires a peer of ' +
    '@ionic-native/core@^3.6.0 but none is installed. You must install peer ' +
    'dependencies yourself.\nnpm WARN @ngx-translate/core@9.1.1 requires a ' +
    'peer of @angular/core@>=5.0.0 but none is installed. You must install ' +
    'peer dependencies yourself.\nnpm WARN The package @types/node is ' +
    'included as both a dev and production dependency.\n\nnpm ERR! path ' +
    '/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim\n' +
    'npm ERR! code EEXIST\nnpm ERR! Refusing to delete ' +
    '/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: ' +
    'is outside ' +
    '/path/to/app/node_modules/cordova-ios/node_modules/ios-sim ' +
    'and not a link\nnpm ERR! File exists: ' +
    '/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim\n' +
    'npm ERR! Move it away, and try again.\n\nnpm ERR! A complete log of this ' +
    'run can be found in:\nnpm ERR!     ' +
    '/path/to/app/.npm/_logs/2019-05-23T07_05_52_055Z-debug.log\n',
  code: 1
}
[ERROR] An error occurred while running subprocess cordova.

        cordova platform remove ios --save exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
要将cordova ios更新到最新版本,我需要做什么?你还需要什么我可以给你的信息?我的Mac已经有了最新的操作系统

编辑

我运行了
rm-Rf平台/node_模块/&&npm安装&ionic cordova平台add ios@latest
,现在我在控制台上获得了以下输出

> fsevents@1.2.9 install / path / to / app / node_modules / fsevents
> node install

node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/path/to/app/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" is installed via remote

> node-sass@4.12.0 install / path / to / app / node_modules / node-sat
> node scripts / install.js

Cached binary found at /path/to/app/.npm/node-sass/4.12.0/darwin-x64-72_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall / path / to / app / node_modules / uglifyjs-webpack-plugin
> node lib / post_install.js


> node-sass@4.12.0 postinstall / path / to / app / node_modules / node-sass
> node scripts / build.js

Binary found at /path/to/app/node_modules/node-sass/vendor/darwin-x64-72/binding.node
Testing binary
Binary is fine
npm WARN The package @ types / node is included as both a dev and production dependency.

added 1330 packages from 1442 contributors in 63.504s
> cordova platform add ios @ latest --save
Using cordova-fetch for cordova-ios @ latest
Adding ios project ...
Creating Cordova project for the iOS platform:
Path: platforms / ios
Package: com.gpsno
Name: GPS-No.com
iOS project created with cordova-ios@5.0.1
Installing "cordova-plugin-datepicker" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-geolocation" for ios
Installing "cordova-plugin-googlemaps" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
cordova-plugin-googlemaps depends on GoogleMaps @ ~> 2.7.0, which conflicts with another plugin. GoogleMaps @ ~> 3.1.0 is already installed and was not overwritten.
Running command: pod install --verbose

      Official document https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md Please consider buying beer for us 
Installing "cordova-sqlite-storage" for ios Failed to install 'cordova-sqlite-storage': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

This is because you have
cordova@9.0.0
CLI installed which removed support for use of
requireCordovaModule
by 3rd party plugins, but you have an old version of
cordova-sqlite-storage
plugin installed which makes use of
requireCordovaModule
. So you need to update your version of
cordova-sqlite-storage
plugin:

cordova plugin rm cordova-sqlite-storage && cordova plugin add cordova-sqlite-storage@latest
>fsevents@1.2.9安装/path/to/app/node_模块/fsevents
>节点安装
使用节点预gyp https下载请求发出节点预gyp警告
[fsevents]成功:“/path/to/app/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node”通过远程安装
>节点-sass@4.12.0安装/path/to/app/node_模块/node sat
>节点脚本/install.js
缓存的二进制文件位于/path/to/app/.npm/node sass/4.12.0/darwin-x64-72_binding.node
>uglifyjs网页包-plugin@0.4.6postinstall/path/to/app/node_模块/uglifyjs网页包插件
>节点lib/post_install.js
>节点-sass@4.12.0安装后/path/to/app/node_模块/node sass
>节点脚本/build.js
二进制文件位于/path/to/app/node_modules/node sass/vendor/darwin-x64-72/binding.node
测试二进制
二进位就可以了
npm WARN包@types/node包含为开发和生产依赖项。
在63.504s中添加了来自1442名贡献者的1330个包
>cordova平台添加ios@latest--保存
使用cordova获取cordova ios@latest
正在添加ios项目。。。
为iOS平台创建Cordova项目:
路径:平台/ios
软件包:com.gpsno
姓名:GPS-No.com
使用cordova创建的iOS项目-ios@5.0.1
为ios安装“cordova插件日期选择器”
为ios安装“cordova插件设备”
为ios安装“cordova插件地理位置”
为ios安装“cordova插件谷歌地图”
类型为“podspec”的“framework”标记已弃用,将被删除。请使用“podspec”标签。
cordova插件googlemaps依赖于googlemaps@~>2.7.0,这与另一个插件冲突。GoogleMaps@~>3.1.0已安装,未被覆盖。
正在运行的命令:pod安装--verbose
公文https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md 请考虑为我们买啤酒。
为ios安装“cordova sqlite存储”
未能安装“cordova sqlite存储”:cordova错误:不支持使用“requireCordovaModule”加载非cordova模块“q”。相反,将此模块添加到依赖项中,并使用常规的“require”加载它

这是因为您有
cordova@9.0.0
CLI由第三方插件安装,但您安装了旧版本的
cordova sqlite storage
插件,该插件使用
requireCordovaModule
。因此,您需要更新您的
cordova sqlite storage
插件版本:

cordova plugin rm cordova-plugin-googlemaps --nosave && cordova plugin add cordova-plugin-googlemaps@latest
cordova插件googlemaps依赖于googlemaps@~>2.7.0,这与另一个插件冲突。GoogleMaps@~>3.1.0已安装,未被覆盖

同样可能是由于过时版本的
cordova插件googlemaps
,所以请更新它:

npm install -g cordova-check-plugins
cordova-check-plugins --unconstrain-versions --update=auto
# or --update=interactive for interactive update process
请注意,删除插件时使用了
--nosave
选项以保留包含API键的任何插件变量

您还应该检查并更新项目中的其他插件。一种简单的方法是使用以下工具:

免责声明:我是
cordova check插件的作者

更新插件时请注意,主要版本更新可能包含对应用程序使用的API的破坏性更改,因此您应该注意: 签出更新主要版本的插件的更改日志或提交历史记录,并在应用程序中进行任何必要的API更改

为ios安装“cordova sqlite存储” 未能安装“cordova sqlite存储”:cordova错误:不支持使用“requireCordovaModule”加载非cordova模块“q”。相反,将此模块添加到依赖项中,并使用常规的“require”加载它

这是因为您有
cordova@9.0.0
CLI由第三方插件安装,但您安装了旧版本的
cordova sqlite storage
插件,该插件使用
requireCordovaModule
。因此,您需要更新您的
cordova sqlite storage
插件版本:

cordova plugin rm cordova-plugin-googlemaps --nosave && cordova plugin add cordova-plugin-googlemaps@latest
cordova插件googlemaps依赖于googlemaps@~>2.7.0,这与另一个插件冲突。GoogleMaps@~>3.1.0已安装,未被覆盖

同样可能是由于过时版本的
cordova插件googlemaps
,所以请更新它:

npm install -g cordova-check-plugins
cordova-check-plugins --unconstrain-versions --update=auto
# or --update=interactive for interactive update process
请注意,删除插件时使用了
--nosave
选项以保留包含API键的任何插件变量

您还应该检查并更新项目中的其他插件。一种简单的方法是使用以下工具:

免责声明:我是
cordova check插件的作者

更新插件时请注意,主要版本更新可能包含对应用程序使用的API的破坏性更改,因此您应该注意: 签出要更新m的插件的变更日志或提交历史记录