storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.67k stars 9.32k forks source link

[Bug]: addon-storysource should have source-loader as dependency #25071

Open smouillour opened 11 months ago

smouillour commented 11 months ago

Describe the bug

Hi, source-loader has been moved to devDependencies but it's used in code/addons/storysource/src/preset.ts as a result with the version 7.6.X, I have this issue: Error: Cannot find module '@storybook/source-loader'

To Reproduce

System

Storybook Environment Info:

  System:
    OS: macOS 14.1.1
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.asdf/installs/nodejs/20.9.0/bin/node
    Yarn: 1.22.19 - ~/.asdf/shims/yarn <----- active
    npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 119.0.6045.199
    Safari: 17.1

Additional context

No response

ilyakokotkin commented 10 months ago

happy to fix this one :)

Priyanshu-ai902 commented 7 months ago

This issue can be fix by following this :- i) open package.json and find the @storybook/source-loader entry which may currently be under devDependencies, and move it to dependencies ii) Now install updated dependencies by using this command :- yarn install , then ensure the import path in preset.ts is correct. iii) Now test again with yarn test:demo

barrettluke commented 1 month ago

has this already been resolved? If not I would be willing to work on it.