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

Webpack cannot resolve process in storybook 6.4.13 #17285

Closed
jackw opened this issue Jan 19, 2022 · 4 comments
Closed

Webpack cannot resolve process in storybook 6.4.13 #17285

jackw opened this issue Jan 19, 2022 · 4 comments

Comments

@jackw
Copy link
Contributor

jackw commented Jan 19, 2022

Describe the bug

Whilst attempting to bump Storybook from 6.4.9 to 6.4.13 Webpack build errors are occurring stating that process/browser.js cannot be resolved. The repo in question is using the storybook-webpack5 builders, yarn Pnp and a custom webpack config.

To Reproduce
I apologise for not creating a specific reproduction but I have an open PR that bumps the repo to 6.4.13 but had to apply changes in this commit for storybook to run locally without issue.

System

Environment Info:

  System:
    OS: macOS 12.0.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 3.1.1 - /usr/local/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 97.0.4692.71
    Firefox: 95.0.2
    Safari: 15.1

Additional context
I'm guessing it's related to this PR that was included in the 6.4.13 release.

@shilman
Copy link
Member

shilman commented Jan 19, 2022

That hasn't been patched to 6.4 yet. If you upgrade to 6.5-alpha does that fix things?

npx sb upgrade --prerelease 

Let me know and I'll patch it back

@jackw
Copy link
Contributor Author

jackw commented Jan 19, 2022

That hasn't been patched to 6.4 yet. If you upgrade to 6.5-alpha does that fix things?

Ah ok, wasn't aware it hadn't been patched in 6.4 yet. I took a look at https://github.com/storybookjs/storybook/releases/tag/v6.4.13 where that PR is mentioned. 🤔

Turns out I linked the wrong PR. I meant to link to #17213.

Will take 6.5-alpha for a spin shortly and get back to you. Appreciate the quick response @shilman. 👍

@jackw
Copy link
Contributor Author

jackw commented Jan 19, 2022

If you upgrade to 6.5-alpha does that fix things?

It most certainly does! 🥳

Removing the SB config changes made in my PR that replace ProvidePlugin in webpackFinal and managerWebpack then running npx sb upgrade --prerelease works like a charm (once I fix a couple of yarn PnP related peer dependency issues).

@jackw
Copy link
Contributor Author

jackw commented Jan 28, 2022

Closing this as I've now bumped to storybook v6.4.15 and it's working as expected. Thanks @shilman!

@jackw jackw closed this as completed Jan 28, 2022
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

2 participants