'can't build iOS on m1 MacBook
[13:50:23] ionic-app-script task: "build"
[13:50:23] Error: Failed to transpile program
Error: Failed to transpile program
at new BuildError (/Users/pedrojung/Downloads/cmmcl_app/ios/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at /Users/pedrojung/Downloads/cmmcl_app/ios/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
at new Promise (<anonymous>)
at transpileWorker (/Users/pedrojung/Downloads/cmmcl_app/ios/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
at Object.transpile (/Users/pedrojung/Downloads/cmmcl_app/ios/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
at /Users/pedrojung/Downloads/cmmcl_app/ios/node_modules/@ionic/app-scripts/dist/build.js:109:82
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ionic:build: `node --max-old-space-size=8192 --stack-size=1968 node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build "--target" "cordova" "--platform" "ios"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ionic:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
what maybe the problem... I have been using this code long time but I haven't seen it for about 6months...
ionic cordova platform rm ios ionic cordova platform add [email protected] ionic cordova prepare ios ionic cordova build iOS
above is how I rebuild
ionic info
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.4
Cordova:
Cordova CLI : 8.1.2 ([email protected])
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 25 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
ios-sim : 8.0.2
NodeJS : v10.16.3 (/Users/pedrojung/.nvm/versions/node/v10.16.3/bin/node)
npm : 6.9.0
OS : macOS Monterey
Xcode : Xcode 13.2.1 Build version 13C100
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
