What this error means
npx cap sync copies the built website into the app, but the webDir folder doesn’t exist — the web build didn’t run, or writes somewhere else.
Why it happens
npx cap sync copies the folder named by webDir into the native projects. That folder is not there, because the web build did not run or wrote somewhere else.
The message tools print
[error] Could not find the web assets directory: ./dist.
Please create it and make sure it has an index.html file. You can change the path of this directory in capacitor.config.ts (webDir option).How to fix it
- Run npm run build before npx cap sync.
- Make webDir in capacitor.config match the folder the build writes: dist for Vite, build for Create React App, out for a Next.js export.
The Capacitor appId and bundle ID validator checks the appId and webDir before you create store records.
Check a log that shows this
Paste the failing step into the build error explainer. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.
