qwikifiers / qwik-nx

Nx plugin for Qwik
131 stars 24 forks source link

Preview not working -- Failed to fetch module #52

Closed n8sabes closed 1 year ago

n8sabes commented 1 year ago

Describe the bug nx preview qwikapp will not load modules and reports Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:4173/build/q-b524001a.js.

To Reproduce

  1. Create vanilla qwik workspace

    npx create-nx-workspace --preset=qwik-nx --e2eTestRunner=none
    cd project
    pnpm preview qwikapp
  2. Launch in browser http://localhost:4173/

  3. Click "Blow my mind` button.

  4. Check console for errors

Screenshot image

n8sabes commented 1 year ago

@dmitry-stepanenko, I tried modifying the project.json with what I think this fix does (below) including a few variations of options, but cannot get preview working.

Is there a way to manually modify the current project, or do I need to build qwik-nx to verdaccio and re-generate a project?

"preview": {
      "executor": "@nrwl/vite:preview-server",
      "options": {
        "buildTarget": "qclient:build-ssr",
        "ssr": null
      },
      "dependsOn": [
        "build"
      ]
    },