Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook in a new project does not install/run #237

Open
intellix opened this issue Aug 26, 2024 · 0 comments
Open

Storybook in a new project does not install/run #237

intellix opened this issue Aug 26, 2024 · 0 comments

Comments

@intellix
Copy link
Contributor

intellix commented Aug 26, 2024

Current Behavior

I'm trying to update nx in my current project and ran into something issues, so I figured I'll create a new project and see how it's setup there (we haven't updated in a while and may have missed some steps or are using some old workarounds).

Created a brand new project and storybook fails:

npx create-nx-workspace --preset qwik-nx
npx nx generate qwik-nx:storybook-configuration
npx nx run frontend:storybook

Error:

 NX   Cannot find module 'storybook/internal/core-server'

So I've installed it manually:

npm install storybook

I thiink it's working but I'm getting window errors (think related to literalpie/storybook-framework-qwik#74):

6:24:22 PM [vite] Error when evaluating SSR module /src/components/icons/qwik.tsx:
|- ReferenceError: window is not defined
    at eval (/Projects/org/apps/frontend/src/components/icons/qwik.tsx:38:3)

Expected Behavior

Starting a new project and adding storybook should work without extra steps or errors.

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace --preset qwik-nx
  2. npx nx generate qwik-nx:storybook-configuration
  3. npx nx run frontend:storybook

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.13.1
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.5.2

nx                 : 19.6.2
@nx/js             : 19.6.2
@nx/linter         : 19.6.2
@nx/eslint         : 19.6.2
@nx/workspace      : 19.6.2
@nx/cypress        : 19.6.2
@nx/devkit         : 19.6.2
@nx/eslint-plugin  : 19.6.2
@nx/storybook      : 19.6.2
@nrwl/tao          : 19.6.2
@nx/vite           : 19.6.2
@nx/web            : 19.6.2
typescript         : 5.5.4
---------------------------------------
Community plugins:
qwik-nx : 2.3.0

Failure Logs

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@intellix and others