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