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

Breakage on build between Webpack 5.21.2 and 5.23.0 #1786

Closed
jasonwilliams opened this issue Apr 29, 2021 · 9 comments
Closed

Breakage on build between Webpack 5.21.2 and 5.23.0 #1786

jasonwilliams opened this issue Apr 29, 2021 · 9 comments
Labels

Comments

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Apr 29, 2021

5.21.2

Building style guide...
Style guide published to:
****

5.23.0

Building style guide...
TypeError: Cannot read property 'options' of null
TypeError: Cannot read property 'options' of null
    at commandBuild (/user/project/node_modules/react-styleguidist/lib/bin/styleguidist.js:115:42)
    at Object.<anonymous> (/user/project/node_modules/react-styleguidist/lib/bin/styleguidist.js:71:5)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47

The issue seems to stem from https://github.com/styleguidist/react-styleguidist/blob/master/src/scripts/build.ts#L5-L13 on 5.21.2 it returns a Compiler object, on 5.23 it returns null.

_webpack.default(_makeWebpackConfig.default(config, 'production'), (err, stats) => {console.log(stats)})
>> null

webpack.default(_makeWebpackConfig.default(config, 'production'))
>> Compiler {hooks: {…}, webpack: ƒ, name: undefined, parentCompilation: undefined, root: Compiler, …}

It doesn't seem to like the callback

Reproduce
Install Webpack 5.23.0 and run styleguidist build

Version: 11.1.5

@marcisp
Copy link

marcisp commented May 12, 2021

Same issue here.

@marcisp
Copy link

marcisp commented May 12, 2021

@jasonwilliams did you manage to resolve that issue? :)

@jasonwilliams
Copy link
Collaborator Author

@marcisp sadly not but I hope to look into it soon. Feel free to investigate and add anything you find here it will be useful.

@jasonwilliams
Copy link
Collaborator Author

jasonwilliams commented May 21, 2021

Interestingly i can't reproduce this when building against master, only on 11.1.6
Its because when you yarn link against it it uses webpack 4, eugh

@stale
Copy link

stale bot commented Oct 2, 2021

😴 This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week without any further activity. Consider opening a pull request if you still have this issue or want this feature.

@stale stale bot added the wontfix label Oct 2, 2021
@lusq010
Copy link

lusq010 commented Nov 2, 2021

I got same problem, while my webpack version is 5.21.2 and react-styleguidist 11.1.5. Is there any new progress on this issue? SOS!

@jasonwilliams
Copy link
Collaborator Author

jasonwilliams commented Nov 14, 2021

I know this may not help your situation, but I moved to storybook in the end. I think it’s unlikely this will get fixed

@stale stale bot removed the wontfix label Nov 14, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 11.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kliph-gladly
Copy link

This issue was not resolved for me on react-styleguidist version 11.2.0 . I ended up upgrading from Webpack 5.57.1 to Webpack 5.75.0 which resolved the issue for me. I did not investigate further to see which particular version of Webpack resolves this issue.

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

No branches or pull requests

4 participants