Hello,
I execute command cap migrate but now my app don’t work
when i make “ionic serve” i get
D:\IonicApp\cdt-test>ionic serve
vue-cli-service.cmd serve
[vue-cli-service] INFO Starting development server…
Build finished at 16:04:36 by 0.000s
[vue-cli-service] error in ./node_modules/@capacitor-community/sqlite/dist/esm/index.js
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/core’ in ‘D:\IonicApp\cdt-test\node_modules@capacitor-community\sqlite\dist\esm’
[vue-cli-service] error in ./src/components/Tienda/Facing.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\components\Tienda’
[vue-cli-service] error in ./src/components/imageCadena.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/filesystem’ in ‘D:\IonicApp\cdt-test\src\components’
[vue-cli-service] error in ./src/views/Login/Login.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\views\Login’
[vue-cli-service] error in ./src/views/Modulos/Cobertura/DetallePromotor.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\views\Modulos\Cobertura’
[vue-cli-service] error in ./src/views/Modulos/Configuracion/Datos.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\views\Modulos\Configuracion’
[vue-cli-service] error in ./src/views/Modulos/Configuracion/Imagenes.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/filesystem’ in ‘D:\IonicApp\cdt-test\src\views\Modulos\Configuracion’
[vue-cli-service] error in ./src/views/Modulos/Tienda/FacingProducto.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\views\Modulos\Tienda’
[vue-cli-service] error in ./src/views/Modulos/Tienda/TiendaIngreso.vue?vue&type=script&lang=ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/geolocation’ in ‘D:\IonicApp\cdt-test\src\views\Modulos\Tienda’
[vue-cli-service] error in ./src/Util/js/vdaapp.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\Util\js’
[vue-cli-service] error in ./src/composables/useDevice.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/device’ in ‘D:\IonicApp\cdt-test\src\composables’
[vue-cli-service] error in ./src/composables/useImage.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/camera’ in ‘D:\IonicApp\cdt-test\src\composables’
[vue-cli-service] error in ./src/composables/useImage.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/filesystem’ in ‘D:\IonicApp\cdt-test\src\composables’
[vue-cli-service] error in ./src/composables/useTabla.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/preferences’ in ‘D:\IonicApp\cdt-test\src\composables’
[vue-cli-service] error in ./src/main.ts
[vue-cli-service] Module not found: Error: Can’t resolve ‘@capacitor/core’ in ‘D:\IonicApp\cdt-test\src’
Build finished at 16:04:36 by 0.000s
D:\IonicApp\cdt-test>npx cap sync
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
(node:4404) [DEP0148] DeprecationWarning: Use of deprecated folder mapping “./” in the “exports” field module resolution of the package at D:\IonicApp\cdt-test\node_modules\vuex\package.json.
Update this package.json to use a subpath pattern like “./*”.
(Use node --trace-deprecation ...
to show where the warning was created)
√ Copying web assets from dist to android\app\src\main\assets\public in 275.94ms
√ Creating capacitor.config.json in android\app\src\main\assets in 1.76ms
√ copy android in 321.08ms
√ Updating Android plugins in 8.32ms
[info] Found 2 Capacitor plugins for android:
@capacitor-community/sqlite@3.7.0
capacitor-native-biometric@4.1.3
× update android - failed!
[error] Unable to find node_modules/@capacitor/android.
Are you sure @capacitor/android is installed?
D:\IonicApp\cdt-test>npx cap doctor
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 4.6.1
@capacitor/core: 4.6.1
@capacitor/android: 4.6.1
@capacitor/ios: 4.6.1
Installed Dependencies:
@capacitor/core: not installed
@capacitor/android: not installed
@capacitor/ios: not installed
@capacitor/cli: 4.0.1
[error] Missing attribute in app/src/main
D:\IonicApp\cdt-test>npm install @capacitor/cli@latest
added 94 packages, and audited 95 packages in 10s
9 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
D:\IonicApp\cdt-test>npx cap migrate
[info] Please note this tool is not intended for use in a mono-repo enviroment, please check out the Ionic vscode
extension for this functionality.
[?] Capacitor 4 sets a deployment target of iOS 13 and Android 12 (SDK 32).
√ Are you sure you want to migrate? (Y/n) … y
[?] Would you like the migrator to run npm install to install the latest versions of capacitor packages? (Those using
other package managers should answer N)
√ Run Npm Install? (Y/n) … y
√ Installing Latest NPM Modules. in 1.57s
[info] NOTE: @capacitor/storage was renamed to @capacitor/preferences, please be sure to replace occurances in your
code.
√ Migrating @capacitor/storage to @capacitor/preferences. in 5.90s
√ Running cap sync. in 1.97s
× Upgrading gradle wrapper files - failed!
[error] gradle wrapper files were not updated
[info] IMPORTANT: Review Updating to 4.0 | Capacitor Documentation for breaking changes in these plugins that
you use: @capacitor/storage, @capacitor/camera.
[info] Warning: The Android Gradle plugin was updated and it requires Java 11 to run. You may need to select this in
Android Studio.
√ Writing breaking changes. in 2.37ms
[success] Migration to Capacitor ^4.0.0 is complete. Run and test your app!