Page 1 of 1

Can't set license in node.js

Posted: Wed Aug 07, 2024 2:14 pm
by djjoyro
Hello,

I'm running stimulsoft-reports-js v2024.3.3 and I need to render some reports (and also pdf files) from the server side, from node.js.
By default I see in the console: "You are using a trial version of the Stimulsoft product!" and watermark is present on reports

When I try to add the license with:

Code: Select all

Stimulsoft.Base.StiLicense.key = "6vJhGtLLLz2GNviWmU..." +
    "..." +
    "..." +
    "..." +
    "..." +
    "..." +
    "..." ;
I receive this error in the console:

Code: Select all

TypeError: Cannot read properties of null (reading '0')
    at J.fromNetJsonString (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:13:145739)
    at $O.loadFromString (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:16:194621)
    at $O.decryptFromString (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:16:196124)
    at $O.get2 (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:16:196371)
    at tR.jWesH (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:16:196787)
    at set key [as key] (D:\Git\V4\reports-worker\src\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:16:196585)
Can you help me to correctly set the license on the server side ?
Thank you.

Re: Can't set license in node.js

Posted: Thu Aug 08, 2024 9:34 am
by Max Shamanov
Hello,

Please see the following links to see how to activate the product:
https://www.stimulsoft.com/en/documenta ... vation.htm
https://www.stimulsoft.com/en/blog/arti ... components

If the issue still persist, please send us your request with a detailed description on support@stimulsoft.com.

Thank you.

Re: Can't set license in node.js

Posted: Thu Aug 08, 2024 1:53 pm
by djjoyro
Hello,

Thank you for your answer.
I was adding the license from a different file, not from the entry point of the application.
After moving it to the first lines of the index.ts file, it just worked.

Thank you again.

Re: Can't set license in node.js

Posted: Fri Aug 09, 2024 10:13 am
by Max Shamanov
Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.