storybookjs / storybook

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

react-router broken in angular12 #16552

Closed shilman closed 3 years ago

shilman commented 3 years ago

Describe the bug

Running an angular repro with 6.4.0-beta.25 results in the error:

{
  rawMessage: `ERROR TS2305: Module '"history"' has no exported member 'State'.`,
  message: '\x1B[1m\x1B[31mERROR in \x1B[39m\x1B[22m\x1B[1m\x1B[36m/Users/shilman/projects/testing/angular-error/node_modules/react-router-dom/index.d.ts(3,15)\x1B[39m\x1B[22m\x1B[1m\x1B[31m:\x1B[39m\x1B[22m\n' +
    `\x1B[90mTS2305: \x1B[39mModule '"history"' has no exported member 'State'.`,
  location: { line: 3, character: 15 },
  file: '/Users/shilman/projects/testing/angular-error/node_modules/react-router-dom/index.d.ts'
}

I believe this is a result of https://github.com/storybookjs/storybook/pull/16440

This is NOT a problem in a react or vue3 project (didn't try others).

To Reproduce

npx sb@next repro -t angular angular-error

or

https://stackblitz.com/github/storybookjs/repro-templates/tree/next/angular?preset=node

ndelangen commented 3 years ago

arg... it's been removed in a patch version...

Screenshot 2021-11-02 at 11 58 04

ndelangen commented 3 years ago

A issue has been created: https://github.com/remix-run/history/issues/903

ndelangen commented 3 years ago

upgrading to ^6.0.0-beta.8 should fix this...

shilman commented 3 years ago

Hurrah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-beta.26 containing PR #16554 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

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

bmayen commented 3 years ago

I'm still seeing this in my upgraded project as well as in the stackblitz repro above. Forked the repro and ensured latest deps were installed and the problem persists. Is this working for you @ndelangen?

shilman commented 3 years ago

@bmayen yes it's also failing for me in a fresh project. @ndelangen any ideas?

bmayen commented 3 years ago

can confirm that reverting to beta.18 works in the meantime

ndelangen commented 3 years ago

Damnit, I guess I have to version lock the version of history to 5.0.0 exactly then?

ndelangen commented 3 years ago
➤ YN0018: │ react-router-dom@npm:6.0.0-beta.8: The remote archive doesn't match the expected checksum
➤ YN0018: │ react-router@npm:6.0.0-beta.8: The remote archive doesn't match the expected checksum

???

shilman commented 3 years ago

Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-beta.27 containing PR #16560 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

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

shilman commented 3 years ago

@bmayen @ndelangen appears to be working now. great job @ndelangen !!!

bmayen commented 3 years ago

Thank you!