New version of dashboards errors when running from Node

Stimulsoft Dashboards.JS discussion
Post Reply
richierich
Posts: 14
Joined: Wed Jun 19, 2013 9:12 am

New version of dashboards errors when running from Node

Post by richierich »

I'm in the process of testing dashboards, and I had this working a few days ago, but after upgrading to 2020.5.1 it is errors as soon as I run my test.js program

I have uninstalled / reinstalled 2020.5.1 and it still errors.. rolling back to the previous version fixes this.

my test.js

Code: Select all

console.log("hello");
var Stim=require('stimulsoft-dashboards-js');
console.log("there");

and when I run `node test.js`

It returns..

Code: Select all

hello
W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.reports.js:54
a._table_0=[14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,11,24,24,24,26,24,24,24,20,21,24,25,24,19,24,24,8,8,8,8,8,8,8,8,8,8,24,24,25,25,25,24,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,24,21,27,18,27,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,25,21,25,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,11,24,26,26,26,26,28,28,27,28,1,22,25,19,28,27,28,25,10,10,27,1,28,24,27,10,1,23,10,10,10,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,25,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0

ReferenceError: window is not defined
    at Function.toBase64String (W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.reports.js:54:45568)
    at W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:8:215617
    at W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:8:216271
    at W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:8:216301
    at W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:8:216335
    at W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:7:130
    at Object.<anonymous> (W:\Node_JS_Dash\node_modules\stimulsoft-dashboards-js\Scripts\stimulsoft.dashboards.js:7:299)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: New version of dashboards errors when running from Node

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
richierich
Posts: 14
Joined: Wed Jun 19, 2013 9:12 am

Re: New version of dashboards errors when running from Node

Post by richierich »

Hi,

It's not even using a project, all I'm doing is using NPM to download the latest version, and running the above JS script.

Rich
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: New version of dashboards errors when running from Node

Post by Lech Kulikowski »

Hello,

Please check the following samples:
https://github.com/stimulsoft/Samples-D ... er/Node.js

Thank you.
richierich
Posts: 14
Joined: Wed Jun 19, 2013 9:12 am

Re: New version of dashboards errors when running from Node

Post by richierich »

When using your samples, it then comes up with another error.

This is a completely fresh install (and I notice that there's a new version 5.1.1)

I download the samples using GIT, then run "npm install"

When I try to run it, the following appears..

$ node index.js

Code: Select all

internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module 'xmldoc'
Require stack:
- W:\StimulsoftCode\git_stuff\Samples-Dashboards-JS\Node.js\01. Load Dashboard and Save Dashboard\node_modules\stimulsoft-dashboards-js\index.js
- W:\StimulsoftCode\git_stuff\Samples-Dashboards-JS\Node.js\01. Load Dashboard and Save Dashboard\index.js
?[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)?[39m
?[90m    at Function.Module._load (internal/modules/cjs/loader.js:864:27)?[39m
?[90m    at Module.require (internal/modules/cjs/loader.js:1044:19)?[39m
?[90m    at require (internal/modules/cjs/helpers.js:77:18)?[39m
    at Object.<anonymous> (W:\StimulsoftCode\git_stuff\Samples-Dashboards-JS\Node.js\01. Load Dashboard and Save Dashboard\node_modules\?[4mstimulsoft-dashboards-js?[24m\index.js:2:37)
?[90m    at Module._compile (internal/modules/cjs/loader.js:1158:30)?[39m
?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)?[39m
?[90m    at Module.load (internal/modules/cjs/loader.js:1002:32)?[39m
?[90m    at Function.Module._load (internal/modules/cjs/loader.js:901:14)?[39m
?[90m    at Module.require (internal/modules/cjs/loader.js:1044:19)?[39m {
  code: ?[32m'MODULE_NOT_FOUND'?[39m,
  requireStack: [
    ?[32m'W:\\StimulsoftCode\\git_stuff\\Samples-Dashboards-JS\\Node.js\\01. Load Dashboard and Save Dashboard\\node_modules\\stimulsoft-dashboards-js\\index.js'?[39m,
    ?[32m'W:\\StimulsoftCode\\git_stuff\\Samples-Dashboards-JS\\Node.js\\01. Load Dashboard and Save Dashboard\\index.js'?[39m
  ]
}
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: New version of dashboards errors when running from Node

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: New version of dashboards errors when running from Node

Post by Lech Kulikowski »

Hello,

The issue is fixed. Please check the 2020.5.1b version from npm.

Thank you.
Post Reply