Prisma client schema not found, nextjs app

1.2k views Asked by At

Disclaimer I am using yarn workspaces, my project is structured like:

- packages
  - prisma-client
  - web-app (typescript + nextjs)
  - service-1 (normal typescript node application)

"service-1" and "web-app" both reference the "prisma-client". The prisma client then includes a dist folder which just the result of the prisma generate command.

When I access the prisma client package in the service-1 package, it works as expected (where queries can be run), but when I try to use it within the "web app" I get an error saying

Query engine exited with code 101: 'Could not open datamodel file "\\schema.prisma".

Here is what my next.config.js looks like

const withTM = require('next-transpile-modules');

module.exports = withTM(['@app/prisma-client'])({
    webpack(config) {
        config.resolve.symlinks = true

        return config;
    }
})

My assumption is that this is a webpack issue, where the schema file isn't resolving correctly. Not entirely sure.

0

There are 0 answers