-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
Description
Reproduction
Reproduction repo: https://github.com/jezikk/rr-process-error
Reproduction steps:
- Clone project.
- Start project using
pnpm dev. - Go to the main page.
Changes in code:
- Add .env file.
- Add a new function which throws 401 error
- Call this function in the loader of root
- Add process.env.TEST to ErrorBoundary component
System Info
System:
OS: macOS 15.5
CPU: (12) arm64 Apple M3 Pro
Memory: 111.19 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.2.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.3.0 - /opt/homebrew/bin/npm
pnpm: 9.15.4 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 138.0.7204.159
Edge: 138.0.3351.95
Safari: 18.5
npmPackages:
@react-router/dev: ^7.7.0 => 7.7.0
@react-router/node: ^7.7.0 => 7.7.0
@react-router/serve: ^7.7.0 => 7.7.0
react-router: ^7.7.0 => 7.7.0
vite: ^6.3.3 => 6.3.5Used Package Manager
pnpm
Expected Behavior
It could be possible to render process.env environments in ErrorBoundary component.
Actual Behavior
ReferenceError: process is not defined
at ErrorBoundary (http://localhost:5173/app/root.tsx:118:17)
at react-stack-bottom-frame (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:17422:20)
at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:4204:24)
at updateFunctionComponent (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:6617:21)
at beginWork (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:7652:20)
at runWithFiberInDEV (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:1483:72)
at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:10866:98)
at workLoopSync (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:10726:43)
at renderRootSync (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:10709:13)
at performWorkOnRoot (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=8098185c:10357:46)