Open theJenix opened 1 year ago
Ran into the same issue. Found there are two fixes necessary to make it work:
As you mentioned, line 17 of the example needs to be changed to this:
var router = express.Router.call();
And then on line 35, take out the '.call':
app.use('/birds', router);
After making these changes the express example worked and I was able to browse to the /birds
and the /birds/about
routes.
New issue node/Events.hx:16: characters 24-30 : Not enough type parameters for node.Events
At end I solved this by replacing the events definition with an empty dummy class
since I am not using it directly, but the request module does at runtime, I am OK with that
Following the instructions to try and get the express example to run. When I run npm install, it runs dts2hx but produces a ton of errors like:
when trying to convert the modules
express-serve-static-core
andmime
.If I ignore those errors and attempt to build Server.hx via
haxe build.hxml
I get the following error:Server.hx:17: characters 31-36 : Class<express.Router> has no field call_ (Suggestion: call)
When I change
call_
tocall
on that line, it builds. I can then run the server and see the Hello World page, but when I click on the /birds link I see: