ionic-team / ionic-team/ionic-cli

Ionic build ios error: Cannot read property ‘name’ of undefined

未關閉
#4,600 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
triage
主要語言
TypeScript
星號
2k
分支
682
PR 合併指標
30 天內沒有已合併 PR

描述

I'm trying to build an ios application with ionic 5, but I'm getting the following feedback.
I run the npm install and with the generated icons and splash features already I run the ios build command and have the following error.
More details below

```javascript

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
at /Users/sqlink/sql/tecnico/platforms/ios/cordova/lib/build.js:145:60
at _fulfilled (/Users/sqlink/sql/tecnico/node_modules/q/q.js:854:54)
at /Users/sqlink/sql/tecnico/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (/Users/sqlink/sql/tecnico/node_modules/q/q.js:816:13)
at /Users/sqlink/sql/tecnico/node_modules/q/q.js:624:44
at runSingle (/Users/sqlink/sql/tecnico/node_modules/q/q.js:137:13)
at flush (/Users/sqlink/sql/tecnico/node_modules/q/q.js:125:13)
at processTicksAndRejections (node:internal/process/task_queues:75:11)
[ERROR] An error occurred while running subprocess cordova.
```

I execute the commands:
``` javascript
ionic cordova build ios
```

after display this mesage:

```javascript
Using cordova-fetch for cordova-ios@^6.1.0
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.cariacica.incidentes.tecnico
Name: TECNICO - INCIDENTES
iOS project created with cordova-ios@6.1.1

```
In the middle of the process this error is returned.Someone knows what may be causing this deadlock

my config.json follows below

```javascript
"dependencies": {
"@angular/animations": "^10.0.2",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.11",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@angular/platform-browser-dynamic": "^9.1.11",
"@angular/router": "^9.1.11",
"@capacitor/android": "^2.2.0",
"@capacitor/core": "2.1.0",
"@ionic-native/background-mode": "^5.28.0",
"@ionic-native/base64": "^5.28.0",
"@ionic-native/camera": "^5.27.0",
"@ionic-native/core": "^5.27.0",
"@ionic-native/diagnostic": "^5.28.0",
"@ionic-native/document-viewer": "^5.27.0",
"@ionic-native/file": "^5.28.0",
"@ionic-native/file-opener": "^5.27.0",
"@ionic-native/file-transfer": "^5.27.0",
"@ionic-native/geolocation": "^5.27.0",
"@ionic-native/ionic-webview": "^5.27.0",
"@ionic-native/native-geocoder": "^5.27.0",
"@ionic-native/native-page-transitions": "^5.27.0",
"@ionic-native/splash-screen": "^5.27.0",
"@ionic-native/status-bar": "^5.27.0",
"@ionic/angular": "^5.2.2",
"@ionic/storage": "^2.2.0",
"angular-validate-br": "0.1.0-beta",
"animate.css": "^4.1.0",
"com-badrit-base64": "^0.2.0",
"com.telerik.plugins.nativepagetransitions": "^0.7.0",
"cordova-android": "^7.1.4",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-background-mode": "^0.7.3",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-nativegeocoder": "^3.4.1",
"cordova.plugins.diagnostic": "^6.0.2",
"moment": "^2.27.0",
"ngx-ionic-image-viewer": "^0.7.1",
"rxjs": "~6.5.1",
"simple-plist": "^1.1.0",
"tslib": "^1.13.0",
"zone.js": "~0.10.2"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-geolocation": {},
"cordova-plugin-nativegeocoder": {
"LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"
},
"com.telerik.plugins.nativepagetransitions": {},
"cordova-plugin-file": {},
"com-badrit-base64": {},
"cordova.plugins.diagnostic": {},
"cordova-plugin-background-mode": {}
},
"platforms": [
"android",
"ios"
]
}
```

貢獻指南

開啟貢獻指南

研究方向

Reproduce the failure with `ionic cordova build ios`, then inspect `platforms/ios/cordova/lib/build.js` around line 145 and the provided Cordova configuration. Compare the generated iOS project and installed Cordova dependencies to determine which value is undefined; done means the iOS build completes without this error.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ios, javascript
領域
cli, mobile-dev
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。