ionic icon indicating copy to clipboard operation
ionic copied to clipboard

help: error during > capacitor sync ios

Open unknownman opened this issue 2 years ago • 6 comments

📚 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",
  }
}


unknownman avatar Sep 20 '23 12:09 unknownman

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

yllaw avatar Sep 26 '23 20:09 yllaw