chingu-voyages / v40-geckos-team-18

My Carbon Footprint - A platform that aims to educate individuals on their contributions of greenhouse gasses and what they can do to lessen their carbon footprint
4 stars 0 forks source link

Feature/ia tickets 27 72 user preferences #92

Closed ialej001 closed 2 years ago

ialej001 commented 2 years ago

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:

There are also some non related fixes in here that I did not want to split out:

Closes #27 #72

TiciaD commented 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!