我正在尝试在我的寓言代码中导入节点模块 . 作为寓言新手,我确实期待如此问题,并且理解导入流程似乎就是其中之一 . 我有下面的代码编译得很好,但在 printfn 语句的行上 Cannot read property 'request' of undefined 的运行时间失败

module Session =
    let inline f (f: 'a->'b->'c->'d) = Func<_,_,_,_> f
    [<Import("default","request")>]
    type Http = 
    abstract request : string -> System.Func<obj,obj,obj,unit> -> unit
    let http : Http = failwith "js only"
    let start () = 

       http.request "http://dr.dk" (ff (fun error response body ->
           printfn "%A" body 
       ))
    do  
        start()