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: 6 comments 5 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.
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.