What this error means
The code imports a package that isn’t in package.json — common when an AI builder adds a plugin import without the dependency.
Why it happens
A source file imports a package that is not listed in package.json, so the bundler cannot resolve it. Builders often add the import and skip the dependency.
The message tools print
[vite]: Rollup failed to resolve import "@capacitor/haptics" from "/home/runner/work/harbor/harbor/src/lib/native.ts".How to fix it
- Install the package named in the error (npm install, then the name) and commit the lockfile.
- For Capacitor plugins, run npx cap sync afterwards.
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.
