Skip to content

[Next.js + Now serverless] Can't resolve 'child_process' in './node_modules/@prisma/photon/runtime' #1226

@Albert-Gao

Description

@Albert-Gao

I am using preview019 with a SQLite db

Photon sits in a file and being used everywhere

import { Photon } from "@prisma/photon";

export const photon = new Photon();

The initialization caused the problem if I change that to something like export const photon = 123;, then this error goes away.

Maybe I get the initialization wrong? Should not reuse this instance?

The project is next.js v9, api is Now serverless, sits in pages/api

After running next, the 1st render to index works, but go to any page will show the following error:
image

However, api is working: /api/graphql is working:

image

anything to do with #1021 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownBug is new, does not have information for reproduction or reproduction could not be confirmed.kind/bugA reported bug.topic: framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions