xxxxxxxxxx
// Note a permanent solution but it worked for me:
* Delete node_modules
* Run `npm install`
* Run `npm install @prisma/client`
* Run `npx prisma generate` `npm prisma db push`
xxxxxxxxxx
Kill the server first
xxxxxxxxxx
npx prisma db push && npx prisma generate
xxxxxxxxxx
a = [
{prop1:"abc",prop2:"qwe"},
{prop1:"bnmb",prop2:"yutu"},
{prop1:"zxvz",prop2:"qwrq"}];
index = a.findIndex(x => x.prop2 ==="qwrq");
console.log(index);
Run code snippet