Unsupported module in scripts: http



  • Hi ,
    I tried to use dotnet-local with the very basic default standard configuration, However getting below exception while running sample "Order" template

    "Error occured - Error during rendering report: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything Stak - Error: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything "

    Below is the configuration

    var rs = new LocalReporting()
    .UseBinary(JsReportBinary.GetBinary())
    .KillRunningJsReportProcesses()
    .RunInDirectory(Path.Combine(Directory.GetCurrentDirectory(), "jsreport"))
    .Configure(cfg => cfg
    .CreateSamples()
    .AllowLocalFilesAccess()
    .BaseUrlAsWorkingDirectory()
    .AllowLocalFilesAccess()
    )
    .AsWebServer()
    .RedirectOutputToConsole()
    .Create();
    rs.StartAsync().Wait();
    Process.Start(new ProcessStartInfo("cmd", $"/c start http://localhost:5488"));
    Console.ReadKey();
    rs.KillAsync().Wait();

    .NET Version : - .NET 4.6/4.5
    jsreport.Binary :- 1.10.0.0
    jsreport.Client :- 2.0.2.0
    jsreport.Local:- 1.1.2.0
    jsreport.Types :- 1.8.3.0



  • Please explicitly update jsreport.Types to 1.10.2 and run it again.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.