Build failed in Remix app when using @casl/prisma
See original GitHub issueDescribe the bug
Build failed when using @casl/prisma
in a Remix app due to importing from “./runtime” instead of “./runtime.mjs”
Could not resolve "./runtime"
node_modules/@casl/prisma/dist/es6m/index.mjs:1:154:
1 │ ... as o,prismaQuery as e}from"./runtime";export{ParsingQueryError,...
To Reproduce
- Install
@casl/ability
and@casl/prisma
in a remix run app. I used the Indie Stack starter template. - Build the app using the
npm run dev
script. - The error occurs on build.
Expected behavior A clean build.
By modifying the file node_modules/@casl/prisma/dist/es6m/index.mjs
to change all import * from "./runtime"
to import * from "./runtime.mjs"
, I was able to get a clean and working build.
CASL Version
@casl/ability
- v6.3.2
@casl/prisma
-v1.3.1
Environment:
node
-v18.4.0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[Bug]: PrismaClient execution fails on @remix-run/cloudflare ...
Use create -remix to create a project. Select Cloudflare Workers at that time. Install and build prisma. Write new PrismaClient() in the loader ......
Read more >Build A Fullstack App with Remix, Prisma & MongoDB
Learn how to build and deploy a fullstack application using Remix, Prisma, and MongoDB. In this article, we will be setting up ...
Read more >Build error in Remix app with Prisma seed file - Support
I added Prisma to my previously deployed Remix project and when I pushed it to a remote branch and Netlify picked up the...
Read more >React Remix - Issue with finding @prisma/client module - Fly.io
I am not sure what the issue could be. I only update the Prisma client and have tried multiple things to try and...
Read more >Error about Prisma in Remix's Jokes App tutorial
In Remix's Jokes App tutorial, I got an error in the process of getting a user in session.server.ts. I think the error is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed in @casl/prisma@1.3.3
This patch can be used with patch-package as a temporary fix