qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[🐞] dev build randomly fail

Open TicTak21 opened this issue 2 years ago • 6 comments

Which component is affected?

Qwik Runtime

Describe the bug

Screen Shot 2023-01-17 at 14 06 23
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

  1. pnpm create qwik@latest
  2. Edit files
  3. 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

TicTak21 avatar Jan 17 '23 12:01 TicTak21

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.

DustinJSilk avatar Jan 17 '23 17:01 DustinJSilk

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.

TicTak21 avatar Jan 18 '23 13:01 TicTak21

Looking!

manucorporat avatar Jan 20 '23 10:01 manucorporat

@manucorporat Hi, any updates on this one ? It keeps happening quite frequently.

vladimir-gal avatar Feb 04 '23 12:02 vladimir-gal

Updates?

TicTak21 avatar Mar 10 '23 16:03 TicTak21

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.

KaanSali avatar May 10 '23 19:05 KaanSali

I can confirm seeing this on latest (1.2.6) when the Partytown integration (0.8.0) is present in the tree.

VinSpee avatar Aug 03 '23 12:08 VinSpee

I can confirm too seeing this on latest (1.2.10) with Partytown integration (0.8.1) is present in the tree.

rodmoreno avatar Sep 10 '23 10:09 rodmoreno

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.

mhevery avatar Sep 11 '23 17:09 mhevery

When I had that issue with Partytown, clearing the cache helped me. Captura de pantalla 2023-11-24 a la(s) 01 19 15

rodrigotonso avatar Nov 24 '23 04:11 rodrigotonso

closing for https://github.com/QwikDev/qwik/issues/6237

PatrickJS avatar May 06 '24 03:05 PatrickJS