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

TypeError: compilation.getAssetPath is not a function #17732

Open
dep opened this issue Mar 16, 2022 · 1 comment
Open

TypeError: compilation.getAssetPath is not a function #17732

dep opened this issue Mar 16, 2022 · 1 comment

Comments

@dep
Copy link

dep commented Mar 16, 2022

Describe the bug

I ran into this in my Storybook build job today.

npx build-storybook --output-dir storybook-static/src

Errors:

TypeError: compilation.getAssetPath is not a function

Resolved it by manually adding this dependency:

npm install html-webpack-plugin --save-dev

Feels like a bandaid, but it works for now.

Perhaps related: jantimon/html-webpack-plugin#1546

Extra context
This seemed to crop up after I added webpack as a devDependency in some of the packages that my Storybook is importing as a dependency (they need to webpack themselves for asset publishing to s3, unrelated to Storybook). I think that perhaps their versions of webpack are interfering with Storybook in some way. They're using "webpack": "5.70.0".

Not sure if this is a Storybook bug per se, but adding this here just in case it rings a bell with one of the SB devs.

@sayo96
Copy link

sayo96 commented Dec 8, 2022

What's the fix for this ?

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