Useful ionic spells
Some commands i often forgot:
npm install - install npm. literally thats it
npm audit - check for dependency issues
npm audit fix - fix all dependency issues
ionic serve - open in localhost with browser
ionic cap add android - for new repos, add android files first
ionic cap build android - build the project for android platform
ionic cap sync - sync latest changes to make sure its included in the final apk
ionic cap open android - open android studio to build apk/test with emulator
Basic errors and how to fix:
- capacitor/core version not compatible with certain dependency - just upgrade/downgrade the capacitor/core version in package lock json
- cocoapods error - make sure you have cocoapods & xcode installed.
- ios error - if you’re just trying to generate an apk, delete the whole ios folder and run ionic cap sync again.
- gradle error in android studio - for me, i just close android studio, reopen it and then when theres an alert to update gradle, just click on it to update.
Comments
Post a Comment