haxe-modular icon indicating copy to clipboard operation
haxe-modular copied to clipboard

Error when HXML targets a directory that does not exist

Open jgranick opened this issue 7 years ago • 4 comments
trafficstars

I was going to report this on haxe-loader, but based on the stack trace, I think it occurs from haxe-modular:

webpack: wait until bundle finished: /
Parsed in: 60ms
Stats: 47 types, 25 references
Graph processed in: 8ms
Bundling...
Extract common chunks...
Moved 0 common chunks (0 shared)
fs.js:948
  binding.stat(pathModule._makeLong(path));
          ^

Error: ENOENT: no such file or directory, stat 'C:\Development\JS\openfl-js\samples\haxe\DisplayingABitmap\tmp'
    at Object.fs.statSync (fs.js:948:11)
    at Object.Main.run.$hx_exports.run (C:\Development\JS\openfl-js\samples\haxe\DisplayingABitmap\node_modules\haxe-modular\tool\bin\split.js:734:17)
    at processOutput (C:\Development\JS\openfl-js\samples\haxe\DisplayingABitmap\node_modules\haxe-loader\index.js:75:27)
    at exec (C:\Development\JS\openfl-js\samples\haxe\DisplayingABitmap\node_modules\haxe-loader\index.js:53:27)
    at ChildProcess.exithandler (child_process.js:267:7)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

...changing the HXML to target a directory that has already been created works great, so perhaps there is a way to create the output directory if it does not exist (similar to the Haxe compiler)?

Thanks :grin:

jgranick avatar Dec 19 '17 06:12 jgranick

Is it the -js output?

elsassph avatar Dec 19 '17 21:12 elsassph

That should be fixed in 0.10.2

elsassph avatar Mar 03 '18 21:03 elsassph

This happens for Reporter too

Error: ENOENT: no such file or directory, open '.build/index.js.stats.json'
    at Object.openSync (fs.js:440:3)
    at Object.writeFileSync (fs.js:1281:35)
    at Reporter.save (.../node_modules/haxe-modular/tool/bin/split.js:1606:14)

kLabz avatar Dec 04 '19 12:12 kLabz

Ugh I thought I had fixed that.

elsassph avatar Dec 04 '19 14:12 elsassph