-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Exporting redefined "Object" throws an error in SSR #15485
Copy link
Copy link
Closed
Labels
feat: ssrp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
When Object variable is redefined and exported from a module, Vite SSR fails with an error:
Error: Cannot read properties of null (reading 'defineProperty')
at eval (/home/projects/node-m1jzee/test.js:6:8)
at _0x2e26db._evaluate (https://nodem1jzee-ui1s.w-corp.staticblitz.com/blitz.a2aabdd9.js:352:376700)
at async ModuleJob.run (https://nodem1jzee-ui1s.w-corp.staticblitz.com/blitz.a2aabdd9.js:181:2372)
Related: vitest-dev/vitest#4829
Reproduction
Steps to reproduce
node index.mjs
System Info
StackblitzUsed Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: ssrp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)