Help - Cannot read property 'Localization'
Posted: Tue Oct 23, 2018 1:53 pm
I am trying to launch the viewer from a node.js service running on http:/localhost:3000/Viewer. I cannot find what I am doing wrong or if there is a missing component or a bug!
The route to /Viewer shows the response message in the browser window.
The 'stimulsoft.viewer.js' script is in the same directory as myApps which is running app.js (the server application on port 3000).
Other areas of the code are working correctly to render the report to HTMl (although 'stimulsoft.report.js' installed as an npm module).
My code is this:
The error code is as follows:
Assistance is appreciated!
Rb
The route to /Viewer shows the response message in the browser window.
The 'stimulsoft.viewer.js' script is in the same directory as myApps which is running app.js (the server application on port 3000).
Other areas of the code are working correctly to render the report to HTMl (although 'stimulsoft.report.js' installed as an npm module).
My code is this:
Code: Select all
app.get('/Viewer', function (req, res) {
var n = Date.now();
res.send('You have reached the Stimulsoft Viwer module: '+ n);
//this is work and shows the message in the browser window
var StimulsoftViewer = require('./stimulsoft.viewer.js');
// Create an instance of the viewer
viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
Code: Select all
TypeError: Cannot read property 'Localization' of undefined
at e.Viewer.e.Viewer (C:\Users\rmbaylin\myApps\stimulsoft.viewer.js:10:61)
at Stimulsoft (C:\Users\rmbaylin\myApps\stimulsoft.viewer.js:10:14374)
at Object.<anonymous> (C:\Users\rmbaylin\myApps\stimulsoft.viewer.js:10:14402)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
Rb