Module build failed with thread-loader for javascript modules
lozinsky opened this issue · 10 comments
Describe the bug
When javascript modules build with thread-loader, building fails with the error:
ERROR in ./.storybook/generated-entry.js
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
ENOENT: no such file or directory, open '/storybook-webpack-config-with-thread-loader/.storybook/generated-entry.js'
at PoolWorker.fromErrorObj (/storybook-webpack-config-with-thread-loader/node_modules/thread-loader/dist/WorkerPool.js:262:12)
at /storybook-webpack-config-with-thread-loader/node_modules/thread-loader/dist/WorkerPool.js:204:29
at mapSeries (/storybook-webpack-config-with-thread-loader/node_modules/neo-async/async.js:3625:14)
at PoolWorker.onWorkerMessage (/storybook-webpack-config-with-thread-loader/node_modules/thread-loader/dist/WorkerPool.js:170:35)
at /storybook-webpack-config-with-thread-loader/node_modules/thread-loader/dist/WorkerPool.js:152:14
at Socket.onChunk (/storybook-webpack-config-with-thread-loader/node_modules/thread-loader/dist/readBuffer.js:36:9)
at Socket.emit (events.js:321:20)
at Socket.Readable.read (_stream_readable.js:527:10)
at Socket.read (net.js:618:39)
at flow (_stream_readable.js:998:34)
at emitReadable_ (_stream_readable.js:591:3)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true main[2]
To Reproduce
Steps to reproduce the behavior:
- Add
thread-loader@2.1.3
dependency - Add
thread-loader
to javascript webpack rule - Run
start-storybook
Expected behavior
There should be no error.
Code snippets
https://github.com/lozinsky/storybook-webpack-with-thread-loader
Additional context
I guess that webpack-virtual-modules
plugin
storybook/lib/core/src/server/preview/iframe-webpack.config.js
Lines 52 to 60 in 3bcaaeb
is not compatible with
thread-loader
.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!
Having same issue, any updates? @lozinsky
Might be related to storybookjs/vue-cli-plugin-storybook#84 (comment)
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!
Hi, I am having the same issue. Any update or maybe workaround? @lozinsky @chloeleichen
@hasable we stopped using thread-loader
for javascript code in storybook config
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!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Still seeing this issue running Storybook@latest, webpack@latest, and thread-loader@latest
Same for @nuxtjs/storybook!