explorigin / modular-js

A custom Javascript generator for Haxe that outputs AMD modules.
MIT License
17 stars 12 forks source link

Invalide input value #10

Closed varadig closed 6 years ago

varadig commented 7 years ago

Hi, I use Haxe 3.4.2. When I want to compile my project (NodeJS) I got this error:

/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/Klass.hx:131: characters 19-72 : Invalid input value
/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/JsGenerator.hx:211: characters 2-14 : Called from
/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/JsGenerator.hx:240: characters 5-21 : Called from
<builtin>:1: character 0 : Called from
/usr/local/lib/haxe/std/neko/_std/Array.hx:275: characters 12-18 : Called from
/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/JsGenerator.hx:354: characters 2-29 : Called from
/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/JsGenerator.hx:462: characters 46-77 : Called from
<null pos>:1: character 0 : Called from
Aborted
varadig commented 7 years ago

I add trace to Klass.hx line 131


        if( c.constructor != null ) {
            trace(c);
            code = gen.api.generateStatement(c.constructor.get().expr());
        } else {
            code = "function() {}";
        }

The last output before the error:

/Volumes/Work/Haxe/libs/modular-js/git/src/modular/js/Klass.hx:131: { module => js.Number, init => null, kind => KNormal, meta => { extract => #function:1, add => #function:3, get => #function:0, has => #function:1, remove => #function:1 }, name => Number, pack => [], interfaces => [], params => [], __t => #abstract, doc => null, pos => #pos(/Volumes/Work/Haxe/libs/js-kit/git/js/Number.hx:4: lines 4-19), fields => class fields, isPrivate => false, constructor => new, isInterface => false, isExtern => true, superClass => null, exclude => #function:0, statics => class fields, overrides => [] }

So I think the problem is with the js-kit, but I dont know why

mastef commented 6 years ago

Could be related to https://github.com/HaxeFoundation/haxe/issues/5944, https://github.com/HaxeFoundation/haxe/issues/5963 and https://github.com/HaxeFoundation/haxe/issues/5872 ( which have been resolved by now )

explorigin commented 6 years ago

You should follow one of the forks. I'm no longer maintaining this.