As3hx stopped working

I had successfully installed and used a3hx on my mac using macOS Sierra. Now I can’t can’t get it to work. I’ve deleted and reinstalled it several times and no luck.

Here’s a listing of the run. Any ideas?

melzie-mac:as3hx-master Athena$ ls
AS3 LICENCE.md as3hx.hxml src
CHANGES.md Makefile haxelib.json test
Hexe README.md run.n test.hxml
melzie-mac:as3hx-master Athena$ neko run.n AS3/ Hexe/
Called from sys.io.FileOutput::$statics line 1
Called from Run::main line 110
Called from Run::loop line 32
Called from sys.FileSystem::readDirectory line 94
Uncaught exception - [email protected]_read_dir

Could you try installing and using a different version, and see if it helps?

For example:

haxelib install as3hx 1.0.5
haxelib set as3hx 1.0.5
haxelib run as3hx AS3/ Haxe/

If you haven’t already, you can also try the haxelib run version of running the AS3HX tool

haxelib run as3hx AS3/ Haxe/

Tried those and still no go. Here’s what I got:

melzie-mac:as3hx-master Athena$ haxelib run as3hx AS3/ Haxe/
Error: Library as3hx is not installed
melzie-mac:as3hx-master Athena$ haxelib run run.n AS3/ Haxe/
Error: Library run.n is not installed
melzie-mac:as3hx-master Athena$ haxelib install as3hx 1.0.5
Downloading as3hx-1,0,5.zip…
Download complete : 255696 bytes in 0.8s (297KB/s)
Installing as3hx…
Current version is now 1.0.5
Done
melzie-mac:as3hx-master Athena$ haxelib set as3hx 1.0.5
melzie-mac:as3hx-master Athena$ haxelib run as3hx AS3/ Haxe/
Called from ? line 1
Called from Run.hx line 110
Called from Run.hx line 32
Called from /usr/lib/haxe/std/neko/_std/sys/FileSystem.hx line 94
Uncaught exception - [email protected]_read_dir
melzie-mac:as3hx-master Athena$ neko run.n AS3/ Hexe/
Called from sys.io.FileOutput::$statics line 1
Called from Run::main line 110
Called from Run::loop line 32
Called from sys.FileSystem::readDirectory line 94
Uncaught exception - [email protected]_read_dir
melzie-mac:as3hx-master Athena$

If 1.0.5 doesn’t work, try 1.0.6, or another version

Like this

cd my/project
haxelib run as3hx path/to/source path/for/output

Unless you have “as3hx-master/AS3”, I think you might need a different path for the source

Thanks for the suggestions but one thing that seems to be lost is that the commands I used (neko run.n AS3/ Hexe/) used to work without any problems. After I started having the problem, I reinstalled and recreated the folder structure exactly like it was when it did work. And I get those errors even when there’s no file in the source AS3 folder.

I think the key is knowing what’s causing Uncaught exception - [email protected]_read_dir

That error happens when a Neko-based program cannot read a directory. This usually happens if a directory does not exist, the file permissions are wrong, or some other problem is taking place

It happens when the output directory already exists. I removed the output directory to make as3hx make it itself. And the error was gone.