qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Unable to run the docs locally

Open edbzn opened this issue 3 years ago • 4 comments

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

edbzn avatar Jul 15 '22 09:07 edbzn

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)
    ```

shairez avatar Jul 25 '22 15:07 shairez

i think this is a known issue. Still in the midst of migrating everything to the latest Vite 3 and Qwik City

mhevery avatar Jul 25 '22 18:07 mhevery

@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 🙏

Bildschirmfoto 2022-10-30 um 20 40 55

zanettin avatar Oct 30 '22 19:10 zanettin

thanks @zanettin

@edbzn is this still an issue?

shairez avatar Oct 31 '22 00:10 shairez

@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

zanettin avatar Nov 24 '22 21:11 zanettin

Hi, I confirm the issue is gone. Thank you.

edbzn avatar Nov 25 '22 08:11 edbzn