qwikifiers / qwik-nx

Nx plugin for Qwik
130 stars 23 forks source link

Building and viewing storybook causes @qwik-city-sw-register error #217

Closed intellix closed 4 months ago

intellix commented 7 months ago

Current Behavior

Build storybook and serve it, you'll get an error that:

Failed to resolve module specifier "@qwik-city-sw-register". Relative references must start with either "/", "./", or "../".

Expected Behavior

Storybook should be browseable even after it has been built. Imagine if you want to deploy all of your components to be browseable for documentation purposes

GitHub Repo

No response

Steps to Reproduce

  1. Create a new project

    npx create-nx-workspace@17.0 --preset=qwik-nx --qwikAppName=myapp
    npx nx g qwik-nx:storybook-configuration myapp
    npx nx g qwik-nx:component --name=my-component -p myapp --generateStories
  2. Build and serve your newly built storybook

    npx nx run myapp:build-storybook
    npx http-server dist/storybook/myapp
  3. You'll see an error:

    Screenshot 2023-11-28 at 00 01 23

Nx Report

Node   : 18.18.2
   OS     : darwin-arm64
   npm    : 8.19.4

   nx                 : 17.1.3
   @nx/js             : 17.1.3
   @nx/linter         : 17.1.3
   @nx/eslint         : 17.1.3
   @nx/workspace      : 17.1.3
   @nx/cypress        : 17.1.3
   @nx/devkit         : 17.1.3
   @nx/eslint-plugin  : 17.1.3
   @nx/storybook      : 17.1.3
   @nrwl/tao          : 17.1.3
   @nx/vite           : 17.1.3
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   qwik-nx : 2.0.2

Failure Logs

No response

Additional Information

No response

intellix commented 7 months ago

related to https://github.com/qwikifiers/qwik-nx/issues/206?

dmitry-stepanenko commented 4 months ago

fixed by https://github.com/qwikifiers/qwik-nx/pull/218