1

I'd followed the integration instructions to connect my builder.io account to my qwik application running on localhost:5143 and setup a test page to start playing with visual editor but I got this error on localhost:

10:47:31 PM [vite] Internal server error: Cannot read property 'useQwikCityEnv' of null
  File: /Users/mra/development/personal/qwik/node_modules/@builder.io/qwik-city/index.qwik.mjs:265:14
  263|  };
  264|  const QwikCityProvider = /* @__PURE__ */ componentQrl(inlinedQrl(() => {
  265|    const env = useQwikCityEnv();
     |                ^
  266|    if (!env?.params)
  267|      throw new Error(`Missing Qwik City Env Data`);

and I didn't find any resources online why it happened.

Mechanic
  • 5,015
  • 4
  • 15
  • 38

1 Answers1

1

After several tries I'd found the issue and the solution:

instead of running the local app with dev command which is a browser only render, you should run start command to enable local ssr as well;

npm run start
Mechanic
  • 5,015
  • 4
  • 15
  • 38