【发布时间】:2020-06-24 15:25:59
【问题描述】:
我正在使用 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
这实际上是错误的全部内容,我找不到任何靠近它的东西。有什么想法吗?
【问题讨论】:
-
使用 --verbose 运行您的命令并使用它显示的输出重新编辑您的问题。
-
@MostafaHarb 我用 --verbose 重新运行命令。谢谢。
-
您是否尝试删除构建并重建它?你打电话用的插件是什么?
-
@MostafaHarb 我再次删除了 package-lock 和 node 模块并重建它,仍然是同样的错误。对于呼叫,我们使用来自 @ionic-native/call-number 的 CallNumber。这是你要问的吗?
-
您的 cordova-ios 版本是 5.+ 还是低于 5?如果更新较少(使用 ionic cordova 平台添加 ios@latest 但在删除构建之前),它将得到解决,否则告诉我。
标签: ios typescript cordova ionic-framework compiler-errors