qwik
qwik copied to clipboard
[🐞] dev build randomly fail
Which component is affected?
Qwik Runtime
Describe the bug
2:05:44 PM [vite] Internal server error: Cannot read properties of null (reading 'useQwikCityEnv')
File: /Users/.../node_modules/.pnpm/@[email protected]/node_modules/@builder.io/qwik-city/index.qwik.mjs:276:14
274| };
275| const QwikCityProvider = /* @__PURE__ */ componentQrl(inlinedQrl(() => {
276| const env = useQwikCityEnv();
| ^
277| if (!env?.params)
278| throw new Error(`Missing Qwik City Env Data`);
at QwikCityProvider_component_TxCFOy819ag (/Users/.../node_modules/.pnpm/@[email protected]/node_modules/@builder.io/qwik-city/index.qwik.mjs:276:14)
at invoke (file:///Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/core.mjs:706:26)
at file:///Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/core.mjs:6348:28
at async renderRoot (file:///Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/core.mjs:6840:5)
at async renderSSR (file:///Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/core.mjs:6836:5)
at async Proxy.renderToStream (file:///Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/server.mjs:632:3)
at async /Users/.../node_modules/.pnpm/@[email protected][email protected]/node_modules/@builder.io/qwik/optimizer.cjs:1763:28
Steps to reproduce
pnpm create qwik@latest- Edit files
- Random error
System Info
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: 2022.11.14.00 - /usr/local/bin/watchman
Browsers:
Brave Browser: 109.1.47.171
Chrome: 108.0.5359.124
Firefox: 104.0.2
Safari: 14.1.1
I get this as well quite regularly while in development. Saving the file again once or twice removes the error.
I havent tested this on production yet but I assume its just a dev issue.
Yes, it works fine after saving, but I think it shouldn't have happened in the first place. It's annoying and I can't find any related information on how to fix it.
Looking!
@manucorporat Hi, any updates on this one ? It keeps happening quite frequently.
Updates?
Still have this issue at version 1.0. It started after installing partytown integration. When I remove QwikPartytown tag from root.tsx, I don't get any errors.
I can confirm seeing this on latest (1.2.6) when the Partytown integration (0.8.0) is present in the tree.
I can confirm too seeing this on latest (1.2.10) with Partytown integration (0.8.1) is present in the tree.
This is a very generic reproduction step Could we have something which is more predictable? Hard to fix if we don't have consistant reproduction.
When I had that issue with Partytown, clearing the cache helped me.
closing for https://github.com/QwikDev/qwik/issues/6237