.prisma/client/edge error on edge functions

As described in the Prisma documentation, I’m creating a Prisma client for edge functions as follows:

import { PrismaClient } from '@prisma/client/edge'
import { withAccelerate } from '@prisma/extension-accelerate'

const prisma = new PrismaClient().$extends(withAccelerate())

Then, when building for deployment, I get this error:

Error message
1:04:46 PM:   There was an error when loading the '.prisma/client/edge' npm module. Support for npm modules in edge functions is an experimental feature. Refer to https://ntl.fyi/edge-functions-npm for more information.

This is my build command:

"build": "prisma generate --no-engine && remix vite:build",

How can I fix it? I couldn’t find any documentation about fixing unsupported modules in edge functions. I’m using Remix.

What happens if you change the import statement to:

import { PrismaClient } from 'https://esm.sh/@prisma/client@6.0.1/edge'
import { withAccelerate } from 'https://esm.sh/@prisma/extension-accelerate'

Thanks @hrishikesh for the answer. Unfortunately, I changed to another cloud provider. So I don’t have the opportunity to test it anymore.