Unable to run the docs locally
Qwik Version
0.0.36
Operating System (or Browser)
Linux
Node Version (if applicable)
16.13.0
Which component is affected?
Qwik Optimizer (rust)
Expected Behaviour
I would like to run the qwik-docs on my machine, I'm running yarn workspace qwik-docs dev to do so.
Actual Behaviour
Here is what I get in return:
error when starting dev server:
Error [ERR_REQUIRE_ESM]: require() of ES Module /**/qwik/node_modules/node-fetch/src/index.js from /**/qwik/packages/qwik/dist/optimizer.cjs not supported.
Instead change the require of index.js in /**/qwik/packages/qwik/dist/optimizer.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.sys.dynamicImport (/**/qwik/packages/qwik/dist/optimizer.cjs:603:37)
at Object.configureServer (/**/qwik/packages/qwik/dist/optimizer.cjs:2065:37)
at createServer (file:///**/qwik/node_modules/vite/dist/node/chunks/dep-561c5231.js:59066:41)
at async CAC.<anonymous> (file:///**/qwik/node_modules/vite/dist/node/cli.js:699:24)
Additional Information
No response
This is the error I'm getting -
error when starting dev server:
Error: "resolvePackageData" is not supported in CJS build of Vite 3.
Please use ESM or dynamic imports `const { resolvePackageData } = await import('vite')`.
at module.exports.<computed> (C:\dev\workspace\open-source\qwik\node_modules\vite\index.cjs:29:11)
at C:\dev\workspace\open-source\qwik\node_modules\@builder.io\qwik\optimizer.cjs:1823:25
at Array.map (<anonymous>)
at findQwikRoots (C:\dev\workspace\open-source\qwik\node_modules\@builder.io\qwik\optimizer.cjs:1822:33)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.config (C:\dev\workspace\open-source\qwik\node_modules\@builder.io\qwik\optimizer.cjs:1495:49)
at async resolveConfig (C:\dev\workspace\open-source\qwik\packages\docs\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:61491:25)
at async createServer (C:\dev\workspace\open-source\qwik\packages\docs\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:60105:20)
at async CAC.<anonymous> (C:\dev\workspace\open-source\qwik\packages\docs\node_modules\vite\dist\node\cli.js:688:24)
```
i think this is a known issue. Still in the midst of migrating everything to the latest Vite 3 and Qwik City
@shairez @edbzn still an issue on your end? just tried it on OSX with success. noticed that you've tried it on linux but just wanted to dbl check if this is still present 🙏

thanks @zanettin
@edbzn is this still an issue?
@edbzn any updates from your side? i'd suggest to close this issue and open a new one if needed. hope thats ok for you? cc: @shairez
Hi, I confirm the issue is gone. Thank you.