Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma Example of how to create a reusable NPM package #4370

Closed
bojank opened this issue Jan 7, 2023 · 2 comments
Closed

Prisma Example of how to create a reusable NPM package #4370

bojank opened this issue Jan 7, 2023 · 2 comments

Comments

@bojank
Copy link

bojank commented Jan 7, 2023

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.

@jharrell
Copy link
Member

Hello!

We are reviewing our old pull requests and issues in this repo. In the case that there hasn't been much activity or work, we're going to close them as stale.

We'd still love your contribution, however! If you think that this issue is still relevant, please feel free to comment here or open a new issue. Thank you! 🙏

@jharrell jharrell closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
@husayt
Copy link

husayt commented Dec 28, 2024

this is still the major issue with apps deployed to cloud. Once app is built before deploying prisma generates .prisma in node_modules and places it inside package.json. When that project is deployed and cloud run npm i it throws above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants