Prisma: Could not find photon package @generated/photon when specifying alternate generator output

Created on 23 Oct 2019  路  1Comment  路  Source: prisma/prisma

I am not sure if this and #826 are related as I think the main difference is in the schema.prisma file and I am using typescript.
I have the dependencies required for prisma2: 2.0.0-preview015 like nexus-prisma etc.

For netlify deployment I need to put the generated package into the same folder as the server code. However when I run ts-node --transpile-only src/schema I get the following error:

/Users/s7au/project/node_modules/nexus-prisma/src/dmmf/utils.ts:14
    throw new Error(
          ^
Error: Plugin nexus-prisma failed on "onInstall" hook:

Error: Could not find photon package at @generated/photon. Check that you have configured your Photon generator block in schema.prisma correctly and run prisma generate.

This was also working before on 13.3
Let me know if additional information is needed.

Most helpful comment

I fixed it but ran into something else but for this particular issue this fixed it:

plugins: [nexusPrismaPlugin({
    inputs: {
      photon: join(__dirname, '/generated/photon')
    }
  })],

>All comments

I fixed it but ran into something else but for this particular issue this fixed it:

plugins: [nexusPrismaPlugin({
    inputs: {
      photon: join(__dirname, '/generated/photon')
    }
  })],
Was this page helpful?
0 / 5 - 0 ratings