This repository was archived by the owner on Feb 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Project fails to build with nuxt-prisma
#4
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
Nuxi 3.0.0
RootDir: /tmp/test
Nuxt project info:
- Operating System:
Linux
- Node Version:
v19.2.0
- Nuxt Version:
3.0.0
- Nitro Version:
1.0.0
- Package Manager:
[email protected]
- Builder:
vite
- User Config:
extends
- Runtime Modules:
-
- Build Modules:
-
Reproduction
https://github.com/ohmree/nuxt-prisma-repro
Describe the bug
When building a nuxt app created with pnpm dlx nuxi init <name>
and with the simplest @sidebase/nuxt-prisma
config, it chokes on some of the nuxt-prisma
code - seems like some rollup plugin tries to parse typescript as javascript.
Additional context
No response
Logs
$ pnpm build # this is run in the context of the linked reproduction repo
> @ build /tmp/test
> nuxt build
Nuxi 3.0.0
Nuxt 3.0.0 with Nitro 1.0.0
ℹ Client built in 997ms
ℹ Building server...
✔ Server built in 551ms
✔ Generated public .output/public
ℹ Building Nitro Server (preset: node-server)
WARN rollup-plugin-inject: failed to parse /tmp/test/node_modules/.pnpm/@[email protected]/node_modules/@sidebase/nuxt-prisma/nuxt-prisma/server/middleware/0.prisma.ts. Consider restricting the plugin to particular files via options.include
ERROR
2: import { eventHandler } from 'h3'
3:
4: let prisma: PrismaClient
^
5: declare module 'h3' {
6: interface H3EventContext {
ERROR Unexpected token (Note that you need plugins to import files that are not JavaScript)
at error (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at Module.error (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12429:16)
at Module.tryParse (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12806:25)
at Module.setSource (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12711:24)
at ModuleLoader.addModuleSource (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:21959:20)
ELIFECYCLE Command failed with exit code 1.
sneakylennyBracketJohn
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working