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

Module build failed with thread-loader for javascript modules #9515

Closed
lozinsky opened this issue Jan 17, 2020 · 10 comments
Closed

Module build failed with thread-loader for javascript modules #9515

lozinsky opened this issue Jan 17, 2020 · 10 comments

Comments

@lozinsky
Copy link
Contributor

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:

  1. Add thread-loader@2.1.3 dependency
  2. Add thread-loader to javascript webpack rule
  3. 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

? new VirtualModulePlugin({
[path.resolve(path.join(configDir, `generated-entry.js`))]: `
import { configure } from '@storybook/${framework}';
module._StorybookPreserveDecorators = true;
configure([${stories.map(toRequireContextString).join(',')}
], module);
`,
})

is not compatible with thread-loader.

@stale
Copy link

stale bot commented Feb 8, 2020

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!

@stale stale bot added the inactive label Feb 8, 2020
@chloeleichen
Copy link

Having same issue, any updates? @lozinsky

@stale stale bot removed the inactive label Feb 19, 2020
@fernandopasik
Copy link
Member

fernandopasik commented Feb 21, 2020

Might be related to storybookjs/vue-cli-plugin-storybook#84 (comment)

@stale
Copy link

stale bot commented Mar 13, 2020

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!

@stale stale bot added the inactive label Mar 13, 2020
@hasable
Copy link

hasable commented Apr 1, 2020

Hi, I am having the same issue. Any update or maybe workaround? @lozinsky @chloeleichen

@stale stale bot removed the inactive label Apr 1, 2020
@lozinsky
Copy link
Contributor Author

lozinsky commented Apr 1, 2020

@hasable we stopped using thread-loader for javascript code in storybook config ☹️

@stale
Copy link

stale bot commented Apr 23, 2020

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!

@stale stale bot added the inactive label Apr 23, 2020
@stale
Copy link

stale bot commented May 23, 2020

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!

@chrisgbaker
Copy link

Still seeing this issue running Storybook@latest, webpack@latest, and thread-loader@latest

@lisaschumann
Copy link

Same for @nuxtjs/storybook!

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

7 participants