-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hey, thank you for your time.
I tried to setup a project but sadly encountered an issue.
The following setup I have is the exact setup described on the home page.
I'm using Windows 11.
Dart:
# extraced from `flutter doctor -v`
Dart version 3.10.7Node/NPM:
> node -v
v22.14.0
> npm -v
11.7.0lib/server.dart
import 'package:dart_node_express/dart_node_express.dart';
void main() {
final app = express();
app.get('/', handler((req, res) => res.send('Hello, Dart!')));
app.listen(3000);
}
First building the project works fine:
> dart compile js lib/server.dart -o build/server.js
Compiled 10,273,865 input bytes (5,277,075 characters source) to 129,091 characters JavaScript in 0.36 secondsBut then running it:
> node build/server.js
C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:1360
throw A.initializeExceptionWrapper(A._errorForAsCheck(object, testRti), new Error());
^
TypeError: null: type 'JSNull' is not a subtype of type 'JavaScriptFunction'
at Rti._generalAsCheckImplementation [as _as] (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:1360:79)
at Rti._installSpecializedAsCheck (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:1295:22)
at Object.express (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:2546:17)
at main (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:2582:19)
at C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:3374:7
at C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:3351:7
at dartProgram (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:3368:5)
at Object.<anonymous> (C:\Users\emrey\Programming\dartprojs\dartkanji\build\server.js:3377:3)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
at Object..js (node:internal/modules/cjs/loader:1706:10) {
dartException: _TypeError {
'__rti$_message': "TypeError: null: type 'JSNull' is not a subtype of type 'JavaScriptFunction'"
}
}
Node.js v22.14.0Hope you have a great day and thanks for making this project.
Metadata
Metadata
Assignees
Labels
No labels