Ryan Geddes
10/25/2020, 10:00 PMRyan
10/26/2020, 7:18 AMRyan Geddes
10/26/2020, 5:41 PMRyan Geddes
10/26/2020, 5:42 PM"preinstall": "node config.js", "postinstall": "rm ./prisma/.env && mv ./.env ./prisma/.env && npx prisma init && npx prisma introspect && npx prisma generate",
Ryan Geddes
10/26/2020, 5:42 PMRyan Geddes
10/26/2020, 5:43 PM"preinstall": "node config.js ", "postinstall": "npx prisma init && rm ./prisma/.env && mv .env ./prisma && npx prisma introspect && npm i @prisma/client && node successpig.js"
Ryan Geddes
10/26/2020, 5:44 PMRyan Geddes
10/26/2020, 5:45 PMRyan Geddes
10/26/2020, 5:45 PMRyan Geddes
10/26/2020, 5:46 PMRyan
10/27/2020, 12:05 PMRyan
10/27/2020, 12:24 PMThis didn’t work, as prisma detected that a prisma folder already existed in our repo when trying to instantiate the prisma client. The solution I came up with was to delete the prisma folder before publishing to npm and to run the following postinstall script insteadThis isn’t required as instantiating the Prisma Client doesn’t require deleting the prisma folder. Using Prisma as a dependency for your library would be equivalent to that of using it in an application.
Ryan
10/30/2020, 12:25 PM