You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library admonitus;
import "package:express/express.dart";
main(){
var app = new Express()
..get('/admonitus/list', (ctx){
throw new ArgumentError("custom error in handler");
})
.get("/admonitus", (HttpContext ctx){
//lookup all
})
.get("/admonitus/:id", (HttpContext ctx){
var id = ctx.params["id"];
// loop up single row
})
;
app.listen('0.0.0.0', 8888);
}
i can build the code just fine but when i try to run it, here's what i get:
The built-in library 'dart:json' is not available on the stand-alone VM.
'package:express/express.dart': Error: line 4 pos 1: library handler failed
import "dart:json" as JSON;
^
'file:///home/armin/git/admonitus-rest/admonitusapi/bin/admonitusapi.dart': Error: line 3 pos 1: library handler failed
import "package:express/express.dart";
^
am i doing something wrong?
The text was updated successfully, but these errors were encountered:
well, my code is not using json at all, so i thought, that express is at fault here. are you suggesting that i should just load the json package or that i should rather modify the express package?
hi!
i can build the code just fine but when i try to run it, here's what i get:
The built-in library 'dart:json' is not available on the stand-alone VM.
'package:express/express.dart': Error: line 4 pos 1: library handler failed
import "dart:json" as JSON;
^
'file:///home/armin/git/admonitus-rest/admonitusapi/bin/admonitusapi.dart': Error: line 3 pos 1: library handler failed
import "package:express/express.dart";
^
am i doing something wrong?
The text was updated successfully, but these errors were encountered: