The web directory (..\build) must contain a "index.html" #3845
|
[error] The web directory (..\build) must contain a "index.html". npx cap add android |
Replies: 7 comments 12 replies
|
In your |
|
Should I just create it? an empty Thanks |
|
ionic build before, solve it. |
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 |
|
I checked the output folder and corrected the path from 'www' to 'www/browser'. |
|
+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. |
In your
capacitor.config.jsonfile you should have awebDirentry that must point to a folder where your web assets are built and it should contain anindex.htmlfile.