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

I encountered some bad cases when using thread-loader on windows #56

Open
YourWildDad opened this issue Jun 12, 2021 · 0 comments
Open

Comments

@YourWildDad
Copy link

When I used thread-loader to speed up compilation, I encountered a bad case on windows. When I refrence the es5-ext package, thread-loader will report the following error:

ERROR in ./node_modules/es5-ext/string/#/ends-with/index.js
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
EISDIR: illegal operation on a directory, read
    at PoolWorker.fromErrorObj (D:\Development\test-thread-loader\node_modules\thread-loader\dist\WorkerPool.js:346:12)
    at D:\Development\test-thread-loader\node_modules\thread-loader\dist\WorkerPool.js:219:29
    at mapSeries (D:\Development\test-thread-loader\node_modules\neo-async\async.js:3625:14)
    at PoolWorker.onWorkerMessage (D:\Development\test-thread-loader\node_modules\thread-loader\dist\WorkerPool.js:173:34)
    at D:\Development\test-thread-loader\node_modules\thread-loader\dist\WorkerPool.js:146:14
    at Socket.onChunk (D:\Development\test-thread-loader\node_modules\thread-loader\dist\readBuffer.js:40:9)
    at Socket.emit (events.js:314:20)
    at Socket.Readable.read (_stream_readable.js:507:10)
    at Socket.read (net.js:625:39)
    at flow (_stream_readable.js:1007:34)
 @ ./src/index.js 1:0-49 3:12-20

The minimum unit test for this error can be viewed at https://github.com/YourWildDad/test-thread-loader

I think it is because the loader-runner splits the resource fragment, which leads to abnormal reading of the file.

Please help to fix this error, good luck.

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

No branches or pull requests

1 participant