prisma-examples icon indicating copy to clipboard operation
prisma-examples copied to clipboard

Prisma Example of how to create a reusable NPM package

Open bojank opened this issue 2 years ago • 0 comments

It would be awesome to have one data project that i can reuse in all my services and actual app. I think this would be probably the most common use case for a lot of more complex setups but there is not much guides on how to achieve something like this.

I found this but its very outdated. https://isidoro-ferreiro.medium.com/share-your-prisma-client-across-projects-44d1c7aca6fd

I also found this but am running into an issue where i cant install the package because its trying to bundleDep the node_modules/.prisma folder and thats not a valid name for NPM as in the one issue that exists on that repo. https://github.com/MarcMogdanz/typed-prisma-package

its trying to make a prisma package that has a bundleDependencies which its trying to add a folder .prisma "bundledDependencies": [ "@prisma/client", ".prisma" ]

keep getting this error npm ERR! code EINVALIDPACKAGENAME npm ERR! Invalid package name ".prisma" of package ".prisma@*": name cannot start with a period.

bojank avatar Jan 07 '23 17:01 bojank