The web directory (..\build) must contain a "index.html" #3845
-
[error] The web directory (..\build) must contain a "index.html". npx cap add android |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 8 replies
-
In your |
Beta Was this translation helpful? Give feedback.
-
Should I just create it? an empty Thanks |
Beta Was this translation helpful? Give feedback.
-
ionic build before, solve it. |
Beta Was this translation helpful? Give feedback.
-
Try to build using ionic build then it will generate the www folder with the index.html file |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
if you are using nextjs 13 you should do that in your next.config.js :
after that write this in your package.json :
next run 'npm run static' Or 'yarn static' then you will see an 'out' folder in your project use this folder name in your capacitor.config.ts |
Beta Was this translation helpful? Give feedback.
-
I checked the output folder and corrected the path from 'www' to 'www/browser'. |
Beta Was this translation helpful? Give feedback.
-
+1, This use to work fine when we where on Angular 18, but upgraded to Angular 19, which moves the build over to esbuild (no longer webpack) and that seems to drop the bundle in a "browser" folder under "www" now. |
Beta Was this translation helpful? Give feedback.
In your
capacitor.config.json
file you should have awebDir
entry that must point to a folder where your web assets are built and it should contain anindex.html
file.