Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must build web code before syncing #264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions versioned_docs/version-v5/main/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ npx cap add android
npx cap add ios
```

### Build your web code

If you used [Create a new Capacitor app](#create-a-new-capacitor-app), build your web code with:

```bash
npm run build
```

Otherwise, build your web code with your existing build tools.

:::info
If you don't build your web code first, you'll get an error like:
```
[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.json (webDir option). You may need to compile the web assets for your app (typically npm run
build). More info: https://capacitorjs.com/docs/basics/workflow#sync-your-project
```
:::

### Sync your web code to your native project

Once you've created your native projects, you can sync your web application to your native project by running the following command.
Expand Down