Hey Folks, hopefully someone can offer some advice...
# prisma-client
r
Hey Folks, hopefully someone can offer some advice / assistance on a problem I'm having .... Stack: Node / TS / Express / Prisma I'm trying to do a
createMany
with many relationships, which I know according to the prisma docs you can't do. I have been following the docs on the prisma site, it does the first (main)
CreateMany
then for any of the others in the same bit of script, I get an Error
[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
can anyone please advise how I should do the bulk import? I can post code snippet if it becomes necessary, and I'm happy to do a
Live Share in VSC
or a
Code With Me in WebStorm
if it is easier At this stage of the project, I can, just about get away with refactoring the data, but that would be a total pain in the ass and would need refactoring of other parts of the project that are completed ... possible, but impractical
👀 1
t
Hi Rich, that error is an express error. I’ve dealt with that before. If you share your code snippet, I’ll try to spot the issue.
n
Hey Rich 👋 As Tyler mentioned, it’s an express error. It seems you are trying to change the response object after already sending the response.