`lexical` node-specific package is not traced correctly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Environment
Stackblitz
Reproduction
- Open the StackBlitz
- Run
pnpm build - Start the server
- See the error
To "fix"
- Uncomment the line in the nitro config which traces the package manually
- Rebuild and restart
Describe the bug
When using lexical, Nitro does not include the node-specific package (Lexical.node.mjs in the final artifact. This leads to the following error in prod: Cannot find module '/home/projects/github-br8xh5/.output/server/node_modules/lexical/Lexical.node.mjs' imported from /home/projects/github-br8xh5/.output/server/chunks/routes/index.mjs
Additional context
Originally reported in https://github.com/nuxt/nuxt/issues/27784
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction, run pnpm build, and compare the output with and without the manual Nitro tracing configuration. Inspect how the build traces the lexical package; done means the artifact includes Lexical.node.mjs and the server starts without the production module error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100