带有cordova的Appflow在构建中检测电容器



我有一个项目,以前使用capacitor,但现在只使用cordova

在我的Ionic Dashboard中将其版本化为Commit时,我试图从这个Commit创建Build并收到此错误

[13:57:35]: --------------------------------
[13:57:35]: --- Step: detect_native_type ---
[13:57:35]: --------------------------------
[13:57:35]: Checking if cordova or capacitor project
[13:57:35]: Capacitor project with TS/JS config detected
[13:57:35]: --------------------------------
[13:57:35]: --- Step: dependency_install ---
[13:57:35]: --------------------------------
[13:57:35]: Installing Dependencies
[13:57:35]: $ npm ci --quiet --no-optional
[13:58:03]: ▸ > core-js@3.17.3 postinstall /builds/project-0/node_modules/core-js
[13:58:03]: ▸ > node -e "try{require('./postinstall')}catch(e){}"
[13:58:04]: ▸ > core-js@3.6.4 postinstall /builds/project-0/node_modules/@angular-devkit/build-angular/node_modules/core-js
[13:58:04]: ▸ > node -e "try{require('./postinstall')}catch(e){}"
[13:58:04]: ▸ > sharp@0.25.4 install /builds/project-0/node_modules/sharp
[13:58:04]: ▸ > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
[13:58:04]: ▸ info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
[13:58:06]: ▸ > @angular/cli@9.1.15 postinstall /builds/project-0/node_modules/@angular/cli
[13:58:06]: ▸ > node ./bin/postinstall/script.js
[13:58:07]: ▸ added 2108 packages in 31.198s
[13:58:07]: -------------------------------------
[13:58:07]: --- Step: create_capacitor_config ---
[13:58:07]: -------------------------------------
[13:58:09]: -------------------------
[13:58:09]: --- Step: upload_logs ---
[13:58:09]: -------------------------
[13:58:17]: Unable to upload npm package list log. Skipping.
+------------------+-----------------------+
|               Lane Context               |
+------------------+-----------------------+
| DEFAULT_PLATFORM | ios                   |
| PLATFORM_NAME    | android               |
| LANE_NAME        | android package_build |
+------------------+-----------------------+
[13:58:20]: Capacitor config command failed, ensure capacitor dependency has been updated to version 3 or more
+------+-------------------------+-------------+
|               fastlane summary               |
+------+-------------------------+-------------+
| Step | Action                  | Time (in s) |
+------+-------------------------+-------------+
| 1    | default_platform        | 0           |
| 2    | build_summary           | 0           |
| 3    | add_git_credentials     | 0           |
| 4    | get_appflow_config      | 0           |
| 5    | detect_native_type      | 0           |
| 6    | dependency_install      | 31          |
| 💥   | create_capacitor_config | 2           |
| 8    | upload_logs             | 11          |
+------+-------------------------+-------------+
[13:58:20]: fastlane finished with errors
/usr/local/bundle/bin/fastlane: [!] Capacitor config command failed, ensure capacitor dependency has been updated to version 3 or more (RuntimeError)
/usr/local/bundle/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/helper/sh_helper.rb:12:in `sh'
from /builds/project-0/fastlane/actions/create_capacitor_config.rb:13:in `run'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:162:in `block (2 levels) in parsing_binding'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/lane.rb:33:in `call'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
from /usr/local/bundle/gems/fastlane-2.179.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
from /usr/local/bundle/gems/fastlane-2.179.0/bin/fastlane:23:in `<top (required)>'
from /usr/local/bundle/bin/fastlane:23:in `load'
from /usr/local/bundle/bin/fastlane:23:in `<main>'

使这个错误如此奇怪的是,每次提到'capacitor'都已从我的项目中删除,包括capacitor.config.json文件。

我的ionic.config.json设置看起来像这样

"integrations": {
"cordova": {}
},

最重要的是,我删除了package-lock.json/node_modules并重新安装,然后我ionic cordova platform add/removeios &Android和1ionic cordova准备ios &android .

我仍然收到这个错误。

谁能帮我从ionic dashboardBuild进程中移除电容器?

这是Ionic的一个已知问题,解决方案是联系Ionic并让他们正确地将帐户切换到电容器或cordova。解决方案2是你需要用cordova或capacitor在ionic上创建一个新项目,然后将你的项目克隆到它上面。

最新更新