Comments (10)
This has created an issue for me:
If I use a custom output path (even after removing a ../
). I get an error telling me that the module can't be found in compile time. However, intellisense is working. And when I visit the location, I can see the correct files.
If I remove the custom output path, the app gets compiled.
from prisma.
I faced the same issue
from prisma.
Do I understand correctly that moving your Prisma Schema from ./prisma/schema.prisma
to ./prisma/schema/foo.prisma
and ./prisma/schema/bar.prisma
leads to the output
value still being evaluated relative to ./prisma
instead of ./prisma/schema
?
from prisma.
Do I understand correctly that moving your Prisma Schema from
./prisma/schema.prisma
to./prisma/schema/foo.prisma
and./prisma/schema/bar.prisma
leads to theoutput
value still being evaluated relative to./prisma
instead of./prisma/schema
?
from prisma.
@janpio yes, you are right.
from prisma.
This has created an issue for me:
If I use a custom output path (even after removing a
../
). I get an error telling me that the module can't be found in compile time. However, intellisense is working. And when I visit the location, I can see the correct files.If I remove the custom output path, the app gets compiled.
Using Custom Output Path
Generator
Files inside @prisma/client
Prisma Client Service in NestJS
Error
However, if I omit the custom output path, it works fine
from prisma.
@xudo49 Please open a new discussion or issue for your problem, it does not sounds related to this one. Thank you.
from prisma.
@vimulatus Generally generating into node_modules
manually and especially node_modules/@prisma/client
might not be the best idea, as the behavior of this is pretty much undefined with custom output
. Usually you would probably be better off choosing a defined path in your project.
That being said, that does not explain the error you are getting. Can you delete your node_modules
, and then re-install them and run prisma generate
to double check if it creates your generated Prisma Client in the correct place? Did you look into that master
folder to make sure there is the correct stuff that should be there?
from prisma.
@janpio I've checked it before and yes, it's generate Prisma Client in the correct place.
from prisma.
It seems that the path finding for output
in Prisma Schema is currently not as expected with prismaSchemaFolder
. It still seems to use ./prisma
as the source, even when you moved your ./prisma/schema.prisma
to ./prisma/schema/*.prisma
. It is clearer that this is invalid when you actually have a custom schema folder path like --schema foo/bar
and all your files are in foo/bar/*.prisma
- then the output
seems to currently be relative to foo
.
We might need to revisit this, and either use the schema folder as the folder to be relative to, or even more correct the file (as in theory the file with the output
definition could also be in a subfolder of the schema folder).
from prisma.
Related Issues (20)
- [Instrumentation] `registerInstrumentations` uses the global provider instead of the one passed in HOT 1
- Database migration error HOT 3
- Prisma Multiple Schema Migrations HOT 10
- `migrate diff` complains about schema not listed even though it is present HOT 1
- `prisma:engine:db_query` span missing for `count`/`aggregate` with MongoDB
- Prisma `Unsupported()` columns can be overwritten HOT 5
- Type issue where field is not null HOT 2
- Missing generated Enum in typescript definition when Enum isn't used in Prisma table
- internal error: entered unreachable code HOT 2
- Edge runtime incompatibility error on `$on` or `$use` usage attempt HOT 4
- Return a proper error code and description when encountering zero dates
- Filtering by relationship using "some" results in inefficient queries due to un-correlated sub queries HOT 2
- Support nested queries in `query` extension
- Not possible to omit optional fields in Mongo HOT 2
- Slow generate, then add new models and it got faster ( °o°) HOT 6
- called `Option::unwrap()` on a `None` value HOT 1
- Bug (D1 migrations): IDs of optional relations are lost quietly during migration HOT 3
- prisma migrate dev fails with Error: P1017 (prisma > 5.9.1) HOT 2
- MySQL migration invalid default value @default(now())
- Bug: [D1] Error in performIO: Error: D1_ERROR: too many SQL variables HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma.