prisma / prisma-examples

🚀 Ready-to-run Prisma example projects

Home Page:https://www.prisma.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prisma Example of how to create a reusable NPM package

bojank opened this issue · 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.