Abdul Munim
Abdul Munim
PPrisma
Created by Abdul Munim on 10/20/2024 in #help-and-questions
link local prisma database project into other projects
Question I have two services that is in need of my prisma project that has all the types and prisma client, now I need a way to install it into both projects. My database project only has one file prisma.ts that exports the prisma client, I also need the types of my models as well. my database project package.json { "name": "pricing-oygula-database", "version": "0.0.1", "description": "", "main": "prisma.ts", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "amunim", "license": "ISC", "dependencies": { "@prisma/client": "^5.21.1", "prisma": "^5.21.1", "tsc": "^2.0.4", "typescript": "^5.6.3" } } I tried npm link and then cd into my next.js project to npm link but that does not work. How to reproduce (optional) create 3 folders website some-other-service database Initialize a next.js project in website npm init some-other-service and install express npm i prisma inside database and write a schema.prisma, create prisma.ts file exporting the default prisma client.
6 replies