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

TypeScript regression in 6.0.0-rc.22 #11763

Closed
nareshbhatia opened this issue Aug 3, 2020 · 5 comments
Closed

TypeScript regression in 6.0.0-rc.22 #11763

nareshbhatia opened this issue Aug 3, 2020 · 5 comments

Comments

@nareshbhatia
Copy link

Describe the bug
rc.22 gives "impossible to import loader for .ts" error.

To Reproduce
Steps to reproduce the behavior:

  1. Clone my minimum working example at https://github.com/nareshbhatia/react-component-mwe. This has dependencies set to rc.21.
  2. Run the example (yarn then yarn storybook). Storybook should start and show one component.
  3. Change the dependency to rc.22 and run again.
  4. You will see the following error:
$ start-storybook -p 6006
info @storybook/react v6.0.0-rc.22
info
WARN => File /Users/naresh/projects/react-component-mwe/.storybook/main.ts is detected
WARN    but impossible to import loader for .ts
info => Loading presets
WARN => File /Users/naresh/projects/react-component-mwe/.storybook/main.ts is detected
WARN    but impossible to import loader for .ts
info => Loading presets
info => Loading config/preview file in "./.storybook".
info => Using default Webpack setup.
webpack built a35bf5650e72217f6be8 in 4648ms

Expected behavior
TypeScript project should run without any errors.

System:

Environment Info:

  System:
    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
  Binaries:
    Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.2/bin/npm
  Browsers:
    Chrome: 84.0.4147.105
    Safari: 13.1.2
  npmPackages:
    @storybook/addon-essentials: 6.0.0-rc.21 => 6.0.0-rc.21
    @storybook/addons: 6.0.0-rc.21 => 6.0.0-rc.21
    @storybook/react: 6.0.0-rc.21 => 6.0.0-rc.21
@shilman
Copy link
Member

shilman commented Aug 3, 2020

Thanks @nareshbhatia I'm able to repro.

The problem is due to #11759, which moved a few Vue-related dependencies out of addon-docs. After the upgrade you can see that @babel/register is no longer present in yarn.lock.

As a workaround, I added it back and that fixed the problem:

yarn add @babel/register@7.10.5 --dev

I'm not sure what is the correct fix here, and will follow up with the team. cc @yannbf @ndelangen @tmeasday @tooppaaa

@ndelangen
Copy link
Member

I'm just confused by this: the change in the mentioned PR doesn't change anything relating to @babel/register?

@ajkl2533
Copy link
Contributor

ajkl2533 commented Aug 3, 2020

@shilman I can confirm that the adding of @babel/register works, but also have no idea why there is no change in yarn.lock regarding @babel/register. Also don't think that adding a dependency to make storybook work is not a correct fix. It should go directly to the package IMHO.

@shilman
Copy link
Member

shilman commented Aug 3, 2020

@ajkl2533 that's why i said it's a workaround

@shilman
Copy link
Member

shilman commented Aug 11, 2020

Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.1 containing PR #11885 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

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

No branches or pull requests

4 participants