ios - 运行子流程cordova时出错,但没有解释

标签 ios typescript cordova ionic-framework compiler-errors

我正在使用ionic cordova build --prod --release为iOS编译我的 ionic Angular 构建,并且出现此错误:

编辑:我用--verbose重新运行命令,这是我得到的结果:

This app does not have additional resource files defined
Prepared iOS project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
Cannot read property 'toLowerCase' of undefined
TypeError: Cannot read property 'toLowerCase' of undefined
    at /Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/lib/list-emulator-build-targets:54:45
    at Array.forEach (<anonymous>)
    at /Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/lib/list-emulator-build-targets:52:44
    at Array.reduce (<anonymous>)
    at /Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/lib/list-emulator-build-targets:50:57
    at Array.reduce (<anonymous>)
    at /Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/lib/list-emulator-build-targets:45:28
    at _fulfilled (/Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/node_modules/q/q.js:854:54)
    at /Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/Users/meghan/sandbox/Parks/TSP_Mobile_App/platforms/ios/cordova/node_modules/q/q.js:816:13)
[ERROR] An error occurred while running subprocess cordova.

        cordova build ios --release --verbose exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 2 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 1) +36ms

从字面上看,这是错误的全部,而且我找不到离它很近的东西。有任何想法吗?

最佳答案

检查您的cordova ios版本
如果它是5. +,则删除您的构建并使用

ionic cordova build ios@latest

关于ios - 运行子流程cordova时出错,但没有解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60656461/

相关文章:

ios - 使用 KVO 观察 WKWebView 的 URL 属性在 iOS 10 中不起作用

iOS - 模棱两可的布局

Angular 9 到 10 升级 - Typescript 编译警告 : *. ngtypecheck.ts

angularjs - tsconfig 模块选项 - 'System' 是指 SystemJS 吗?

javascript - 是什么触发了 Blackberry "low memory"警告?

cordova - 无法运行 sass 任务 : missing in gulpfile. js

ios - 在 Xcode 的右侧窗口中逐行查找代码输出,但不存在

ios - 识别 iOS View Controller 类型

javascript - Angular2/ typescript : How to get an array of objects through Pipe?

android - Cordova 3.3.x - Android CordovaLib