Hi
I am currently in the process of learning node.js in combination with Haxe.
My process is documented for future reference here:
http://matthijskamstra.github.io/haxenode/I use js-kit from clemos:
https://github.com/clemos/haxe-js-kit/The last couple of weeks I have been working with it, and it works like a charm.
Sadly something has change....
I was working on a example that showed automation
- nodemon to restart the node server
- grunt-watch to recompile Haxe
- and I gave IntelliJ another try
And maybe it's unrelated, but I have run out of options
I need help:
I was running nodemon and grunt-watch in the terminal from IntelliJ, and I closed IntelliJ without closing the terminals properly.
After that I got this error, in one form or another... "Constant value unexpected here
"
→ haxe javascript.hxml
/usr/lib/haxe/lib/js-kit/git/js/node/events/EventEmitter.hx:5: lines 5-21 : Constant value unexpected here
Even in the most simple example
package ;
import js.Node;
class Main
{
function new()
{
}
static public function main()
{
var main = new Main();
}
}
if you follow the error mentioned:
you see there is nothing funny going on...
remember it used to work for 2 weeks
Another example:
a simple hello world:
https://github.com/MatthijsKamstra/haxenode/tree/master/00helloworld/code
I get this:
→ haxe javascript.hxml
/usr/lib/haxe/lib/js-kit/git/js/node/Http.hx:74: lines 74-84 : Constant value unexpected here
lets follow that error:
https://github.com/clemos/haxe-js-kit/blob/master/js/node/Http.hx#L74again that looks okay, and just scroll up, the same "extern class" are ignored
So perhaps "
implements npm.Package.Require" is the one who gives me these errors?
There is been no update in git from that class...
(and older version seem to create the error also, and that use the work)
So perhaps nodemon and grunt are still running.. (yep getting desperate )
Restart should have fixed that.
Haxe broken? Nope, reinstalled it twice
Openfl project still work, flash projects still work, javascript works...
only these externs don't (anymore)
Macros work fine: tried
http://yal.cc/haxe-some-cleaner-c-style-for-loops/ to test and it works fine.
reinstalled node.js (yep desperate ) ... nothing changed
Used my google-fu :
http://haxe.googlecode.com/svn/tags/v3.0.0-rc2/typeload.mland ended up on the old google code
but
if isconst <> (name = "Const") && t != t_dynamic then error (if isconst then "Constant value unexpected here" else "Constant value excepted as type parameter") p;
doesn't help me .....
I hope it's something I overlooked
and please let this be a dumb question!
So anyone that can help me? Point me in the right direction !