I want to run prisma inside next.js as a /api route. When I was setting it up at first only with the graphql-auth example everything was working fine (beside some problems with typegen with photon, but there's already an issue). Then I changed the schema and added some resolvers and objectTypes and when I wanted to start it again, when going to the route I get the output:
[Error: ENOENT: no such file or directory, mkdir] {
errno: -2,
code: 'ENOENT',
syscall: 'mkdir'
}
and I cannot query the server: "error": "JSON.parse: unexpected character at line 1 column 1 of the JSON data"
When running the same files as a standalone server(with what graphql-auth example provides), it's running fine.
Not sure if it's related to next.js or not, I tried turning on debug on photon and apollo-server, but the only thing I got is:
getos { platform: 'darwin', libssl: undefined } +0ms
Happy to provide more info if needed
I want to run prisma inside next.js as a
/apiroute. When I was setting it up at first only with the graphql-auth example everything was working fine (beside some problems with typegen with photon, but there's already an issue). Then I changed the schema and added some resolvers and objectTypes and when I wanted to start it again, when going to the route I get the output:and I cannot query the server:
"error": "JSON.parse: unexpected character at line 1 column 1 of the JSON data"When running the same files as a standalone server(with what graphql-auth example provides), it's running fine.
Not sure if it's related to next.js or not, I tried turning on debug on photon and apollo-server, but the only thing I got is:
getos { platform: 'darwin', libssl: undefined } +0msHappy to provide more info if needed