nuxt-modules / ionic

Batteries-included, zero-config Ionic integration for Nuxt
https://ionic.nuxtjs.org
MIT License
380 stars 38 forks source link

help: error during > capacitor sync ios #463

Open unknownman opened 1 year ago

unknownman commented 1 year ago

📚 What are you trying to do?

i use "nuxt": "^3.7.3", "@nuxtjs/ionic": "^0.12.1", "@capacitor/ios": "5.4.0", when I do sync > capacitor sync ios , i recieve this error

[capacitor] [error] The web assets directory (./.output/public) must contain an index.html file.
[capacitor]         It will be the entry point for the web portion of the Capacitor app.
[ERROR] An error occurred while running subprocess capacitor.

but during build with nuxt i dont have any index.html inside .output/public

🔍 What have you tried?

yes

ℹ️ Additional context

package.json

{
  "name": "nuxt-fitness-app",
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare",
    "android": "bash ./scripts/android.sh",
    "ios": "bash ./scripts/ios.sh"
  },
  "devDependencies": {
    "@capacitor/cli": "5.4.0",
    "@nuxt/devtools": "latest",
    "@nuxtjs/ionic": "^0.12.1",
    "@nuxtjs/supabase": "^1.1.0",
    "@nuxtjs/tailwindcss": "^6.8.0",
    "@types/node": "^20.6.2",
    "vue-i18n": "^9.4.1"
  },
  "dependencies": {
    "@capacitor/android": "5.4.0",
    "@capacitor/app": "5.0.6",
    "@capacitor/core": "5.4.0",
    "@capacitor/haptics": "5.0.6",
    "@capacitor/ios": "5.4.0",
    "@capacitor/keyboard": "5.0.6",
    "@capacitor/status-bar": "5.0.6",
    "@vueuse/integrations": "^10.4.1",
    "@vueuse/nuxt": "^10.4.1",
    "h3": "1.8.1",
    "nitropack": "npm:nitropack-edge@latest",
    "nuxt": "^3.7.3",
    "nuxt-swiper": "^1.2.2",
  }
}
yllaw commented 1 year ago

It looks like you are running nuxt build command.

To generate static assets used for building native apps use

nuxt generate

The generate command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the nuxi build command with the prerender argument set to true

per Nuxt docs

keduardo2117 commented 6 months ago

Good morning, is there an estimated date to launch update to support Capacitor 6?

yllaw commented 6 months ago

Good morning, is there an estimated date to launch update to support Capacitor 6?

Good morning,

I believe this module already supports Capacitor 6.0 https://github.com/nuxt-modules/ionic/blob/main/package.json

keduardo2117 commented 6 months ago

I saw it but the latest release is the version 0.13.1 and the package.json lists capacitor 5.6 as it supported version https://github.com/nuxt-modules/ionic/blob/92a8322387aa575169bed939f4361d71c94c511d/package.json

yllaw commented 6 months ago

I saw it but the latest release is the version 0.13.1 and the package.json lists capacitor 5.6 as it supported version https://github.com/nuxt-modules/ionic/blob/92a8322387aa575169bed939f4361d71c94c511d/package.json

Interesting,

We have an app using this package that has been upgraded to Capacitor 6 and I don't believe we ran into peer dependency issues but I may be wrong on the latter.

Are you getting any errors when installing with Capacitor 6?

keduardo2117 commented 6 months ago

I did run into that issue specifically, but the team is pushing commits almost daily, so probably sooner than later they will release a next version