Closed
Description
Trying to get this going in an Expo project and not having much luck so far.
- Installed into a new-ish Expo project
- Added the plugin to
app.json
- Added
schema.primsa
to the root directory - Ran
npx prisma@latest generate
- Called
runMigrations
from the root component
export const runMigrations = async () => {
try {
await baseClient.$applyPendingMigrations();
} catch (e) {
console.error(`failed to apply migrations: ${e}`);
throw new Error(
"Applying migrations failed, your app is now in an inconsistent state. We cannot guarantee safety, it is now your responsability to reset the database or tell the user to re-install the app",
);
}
};
The error thrown is Exception in HostFunction: No such file or directory (os error 2)
I am newer to Prisma so did some doc-diving and thought perhaps I needed to run npx prisma migrate dev
which generated a migrations
directory, app.db
and app.db-journal
in my root directory, but this wasn't mentioned in the docs and also didn't solve the problem.
Metadata
Metadata
Assignees
Labels
No labels