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

[6.2.0-rc.2] problem with resolving imports in development mode #14269

Closed
idbartosz opened this issue Mar 18, 2021 · 4 comments
Closed

[6.2.0-rc.2] problem with resolving imports in development mode #14269

idbartosz opened this issue Mar 18, 2021 · 4 comments

Comments

@idbartosz
Copy link

idbartosz commented Mar 18, 2021

Describe the bug

In Storybook 6.2.0 development mode there's a problem with import resolving. This problem only occurs in the development mode the builded version works fine.

To Reproduce

  1. Bootstrap an example project with npx -p @storybook/cli@next sb init --type react
  2. Install some packages which support different modules like CJS and ESM
  3. In development mode try to import and use that package
  • when imported in standard way import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl" package doesn't work correctly in Storybook
  • when specifying the import path directly to ESM it works ok import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl/lib-esm"

Expected behavior

Imports in development mode should work as they were in Storybook 6.1

Screenshots

Screen.Recording.2021-03-18.at.10.27.49.mov

System

  System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.16.0/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Firefox: 86.0.1
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-actions: ^6.2.0-rc.2 => 6.2.0-rc.2 
    @storybook/addon-essentials: ^6.2.0-rc.2 => 6.2.0-rc.2 
    @storybook/addon-links: ^6.2.0-rc.2 => 6.2.0-rc.2 
    @storybook/react: ^6.2.0-rc.2 => 6.2.0-rc.2 

┆Issue is synchronized with this Asana task by Unito

@shilman
Copy link
Member

shilman commented Mar 18, 2021

Do you have a repro repo you can share?

@idbartosz
Copy link
Author

@shilman I see there's already a PR with fix, do you still need a reproduction repo?

@shilman
Copy link
Member

shilman commented Mar 18, 2021

@idbartosz no, i think we figured out the problem and can hopefully get you the fix soon

@shilman
Copy link
Member

shilman commented Mar 19, 2021

Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-rc.4 containing PR #14271 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 shilman closed this as completed Mar 19, 2021
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

3 participants