I have a new M2 Mac Mini, so after i set up my env its work normal, but when i use
ionic build --prod
or
ionic serve --lab
it doesn't showing the expected behavior.
it just buildin on dev env, or serve normally like ionic serve
Already use ionic 7.1.1 and then downgrade to 7.0.0 still not solving this problem, maybe is there any step that i missing ?
Ionic:
Ionic CLI : 7.0.0 (/Users/stevenpu/.nvm/versions/node/v20.5.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 14.2.12
@angular-devkit/schematics : 14.2.11
@angular/cli : 14.2.11
@ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 5.3.0
@capacitor/android : 5.3.0
@capacitor/core : 5.3.0
@capacitor/ios : 5.3.0
Cordova:
Cordova CLI : 11.1.0
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
Utility:
cordova-res : not installed globally
native-run : 1.7.2
System:
NodeJS : v20.5.1 (/Users/stevenpu/.nvm/versions/node/v20.5.1/bin/node)
npm : 10.0.0
OS : macOS Unknown
Xcode : Xcode 14.3.1 Build version 14E300c
As mentioned in comments,
--labis deprecated. But--prodshould work.If you are using it like this:
ionic build -—prod; npx cap copy ;, then it won't have any effect. becausenpx cap copybuilds the project first and override your previous build. you should use it like this:npx cap synchas the same situation. they both build the project first. and if it works like this somewhere else, there might be a versioning problem.However, if these are not your case, please specify what is your expected behaviour and how is it failing to achieve that.