Describe the bug
When running build-storybook -c .storybook -o storybook-static, the build fails to "Compiling manager" step. This only happened with the recent 6.0.0-rc.X versions. I tried with rc 1, 10, 11, and 14. All failed to the same step
The current workaround is to use 6.0.0-beta.20. I checked what version you use in Storybook design system: https://github.com/storybookjs/design-system/blob/master/package.json and copied the same.
To Reproduce
Steps to reproduce the behavior:
Run build-storybook -c .storybook -o storybook-static with new versions of major 6. Console will output this error:
12:25:47 PM: info => Compiling manager..
12:26:25 PM: ERR! => Failed to build the manager
12:26:25 PM: ERR! The comment file "1cd777c4fb4f5c3aa725.worker.js.LICENSE.txt" conflicts with an existing asset, this may lead to code corruption, please use a different name
12:26:25 PM: (node:1637) UnhandledPromiseRejectionWarning: [object Object]
12:26:25 PM: (node:1637) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
12:26:25 PM: (node:1637) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Expected behavior
I would expect the build to succeed.
Code snippets
Our .storybook/main.js:
module.exports = {
stories: ['../src/**/*.stories.@(ts|tsx|js|jsx|mdx)'],
addons: [
'@storybook/addon-knobs/register',
'storybook-addon-designs/register',
'@storybook/addon-actions',
'@storybook/addon-links',
{
name: '@storybook/addon-docs',
options: {
configureJSX: true,
babelOptions: {},
sourceLoaderOptions: null,
},
},
],
};
System:
Environment Info:
System:
OS: Linux 5.7 Fedora 32 (Workstation Edition) 32 (Workstation Edition)
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
Browsers:
Chrome: 84.0.4147.89
Firefox: 78.0.2
npmPackages:
@storybook/addon-actions: 6.0.0-rc.14 => 6.0.0-rc.14
@storybook/addon-docs: 6.0.0-rc.14 => 6.0.0-rc.14
@storybook/addon-knobs: 6.0.0-rc.14 => 6.0.0-rc.14
@storybook/addon-links: 6.0.0-rc.14 => 6.0.0-rc.14
@storybook/addons: 6.0.0-rc.14 => 6.0.0-rc.14
@storybook/preset-typescript: ^3.0.0 => 3.0.0
@storybook/react: 6.0.0-rc.14 => 6.0.0-rc.14
Additional context
Some similar issues I found:
Do you have a repro we can look at?
Not yet, I was thinking it might be an already known issue. I'll try to come up with a reporoducable repo.
I removed storybook-addon-designs and the error went away. @pocka can you help here?
Probably https://github.com/webpack-contrib/worker-loader/issues/260.
The addon depends on react-pdf (I know I should have put the dependency into peerDependencies), which uses Worker script imported via worker-loader. Since I'm not sure which package depends on worker-loader, a temporary workaround until a fix comes to the loader is pinning terser-webpack-plugin to v3.0.6.
// package.json
{
// ...
"resolutions": {
"terser-webpack-plugin": "3.0.6"
}
}
$ npm i -D [email protected]
If none of the above workarounds works, please tell me.
I'll be away for a few weeks and get back to it unless someone from our team looks into it. Thanks for the help already.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Adding a few investigation links:
I didn't have yet time to test if this issue was gone but looks like there are new updates to package.jsons in the dependencies
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!