vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.59k stars 26.23k forks source link

fix storybook entry point for with-storybook example #67206

Closed crebelskydico closed 2 days ago

crebelskydico commented 3 days ago

Verify canary release

Provide environment information

Node.js v20.14.0

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.14.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 8.15.7
Relevant Packages:
  next: 15.0.0-canary.44 // Latest available version is detected (15.0.0-canary.44).
  eslint-config-next: 15.0.0-canary.44
  react: 19.0.0-rc-6230622a1a-20240610
  react-dom: 19.0.0-rc-6230622a1a-20240610
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which example does this report relate to?

with-storybook

What browser are you using? (if relevant)

Chrome 126.0.6478.127

How are you deploying your application? (if relevant)

No response

Describe the Bug

If storybook or build-storybook script is executed for the example Webpack is failing for dev and build with the following error:

SB_BUILDER-WEBPACK5_0002 (WebpackInvocationError): Module not found: Error: Can't resolve './src' in '.'

Entry point for stories introduced here https://github.com/vercel/next.js/pull/64911 is not correct.

Expected Behavior

Storybook dev and build script should run successful without errors that break.

To Reproduce

  1. Install all dependencies from root
  2. Build all packages from root
  3. navigate to the examples/with-storybook dir
  4. run pnpm storybook for dev or pnpm build-storybook for prod build