awesome-typescript-loader icon indicating copy to clipboard operation
awesome-typescript-loader copied to clipboard

Error: EISDIR: illegal operation on a directory, read

Open cvlos opened this issue 7 years ago • 2 comments

I get the following error when I run the project inwebpack --watch mode. This is the stack trace:

 at Object.fs.readSync (fs.js:693:18)
    at tryReadSync (fs.js:557:20)
    at Object.fs.readFileSync (fs.js:600:19)
    at /Users/cavalos/Repos/ad-kargonaut/node_modules/awesome-typescript-loader/src/instance.ts:408:64
    at Array.map (<anonymous>)
    at Compiler.<anonymous> (/Users/cavalos/Repos/ad-kargonaut/node_modules/awesome-typescript-loader/src/instance.ts:405:14)
    at next (/Users/cavalos/Repos/ad-kargonaut/node_modules/tapable/lib/Tapable.js:204:14)
    at Compiler.compiler.plugin (/Users/cavalos/Repos/ad-kargonaut/node_modules/webpack/lib/CachePlugin.js:48:5)
    at Compiler.applyPluginsAsyncSeries (/Users/cavalos/Repos/ad-kargonaut/node_modules/tapable/lib/Tapable.js:206:13)
    at Watching._go (/Users/cavalos/Repos/ad-kargonaut/node_modules/webpack/lib/Compiler.js:48:17)
    at Watching.invalidate (/Users/cavalos/Repos/ad-kargonaut/node_modules/webpack/lib/Compiler.js:142:9)
    at watcher.compiler.watchFileSystem.watch (/Users/cavalos/Repos/ad-kargonaut/node_modules/webpack/lib/Compiler.js:123:9)
    at Watchpack.watcher.once (/Users/cavalos/Repos/ad-kargonaut/node_modules/webpack/lib/node/NodeWatchFileSystem.js:45:4)
    at Object.onceWrapper (events.js:254:19)
    at Watchpack.emit (events.js:159:13)
    at Watchpack._onTimeout (/Users/cavalos/Repos/ad-kargonaut/node_modules/watchpack/lib/watchpack.js:142:7)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)

After replacing awesome-typescript-loader with ts-loader the issue goes away. Any ideas?

Thanks.

cvlos avatar Apr 09 '18 17:04 cvlos

Happens to me randomly about once a day when I'm developing. Reproduced on windows 10.

I just restart webpack. Not the worst thing, but still a bug.

omril1 avatar Aug 19 '18 05:08 omril1

did anyone ever solve it? from some reason when i do changes to a particular file half the times it compiles well while in other times just crashes like the above (could it be due to it being a large file and webstorm locking it for changes/saving while webpack/awesome-typescript-loader trying to read?

btw im on old ver "3.5.0".. @omril1 / @cavalos0086 is this happening in a newer version?

mikila85 avatar Sep 25 '18 10:09 mikila85