Next.js Discord

Discord Forum

Issue with vercel deployed site and StyledJSX

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I don't use styledjsx in my next project, but it seems to be used by nextjs itself. The build succeeds on Vercel, but I get runtime errors on all routes regarding

2023-11-15T15:02:06.104Z    undefined    ERROR    Cannot find module 'styled-jsx/package.json'
Require stack:
- /var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js
- /var/task/___next_launcher.cjs
2023-11-15T15:02:06.105Z    undefined    ERROR    Did you forget to add it to "dependencies" in `package.json`?
INIT_REPORT Init Duration: 264.74 ms    Phase: invoke    Status: error    Error Type: Runtime.ExitError
RequestId: dbc93900-ab09-4a3e-a687-7f2f11728a4d Error: Runtime exited with error: exit status 1
Runtime.ExitError


Have tried adding this manually to my dependencies with no luck, anyone have any idea what might be the issue?

1 Reply

Dwarf CrocodileOP
Note that the build works and runs locally, just not on Vercel