Closed ialej001 closed 2 years ago
On top of the Spinner issue, I'm getting an error when I try to add a Vehicle:
Something went wrong Error: [0] Invalid `prisma.user.findFirst()` invocation: [0] [0] { [0] select: { [0] primaryVehicleId: true, [0] ~~~~~~~~~~~~~~~~ [0] ? id?: true, [0] ? name?: true, [0] ? email?: true, [0] ? emailVerified?: true, [0] ? image?: true, [0] ? country?: true, [0] ? state?: true, [0] ? unitPref?: true, [0] ? accounts?: true, [0] ? sessions?: true, [0] ? vehicles?: true, [0] ? electricityUse?: true, [0] ? fuelUsed?: true, [0] ? flights?: true, [0] ? _count?: true [0] }, [0] where: { [0] id: 'cl7qvrlab0006vem3xs1lqowx' [0] } [0] } [0] [0] [0] Unknown field `primaryVehicleId` for select statement on model User. Available options are listed in green.
SOLVED: Ivan pair programmed with me, since some changes were made to the schema, I had to run npm install
again to get it to update the database properly and it worked fine. Leaving this comment here in case anyone runs into the same error I did!
Please advise:
You need to run
npm install
in order for the prisma schema on your machine to update properly. If you do not do this, you'll get some errors related to unknown fields.A big one for y'all!
Features:
country
is mandatory,state
is optional)id
field in the DBThere are also some non related fixes in here that I did not want to split out:
ControlPanel
component that has three buttons that route to different/account
pages/account
route and all subsequent routes the same layout, offering consistencyCloses #27 #72