Uncaught TypeError: Cannot read property 'length' (2019.1)

Stimulsoft Reports.JS discussion
Post Reply
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Uncaught TypeError: Cannot read property 'length' (2019.1)

Post by mrapi »

Hi
I've publish a project with version 2019.1 to Angular,when i run it i got in console this error:
scripts.bundle.js:9 Uncaught TypeError: Cannot read property 'length' of undefined
at t.d [as init] (scripts.bundle.js:9)
at Object.createReader (scripts.bundle.js:9)
at Object.installJS (scripts.bundle.js:9)
at scripts.bundle.js:11

AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Stimulsoft.Viewer.StiViewerOptions is not a constructor
at new AppComponent (app.component.ts:18)
at createClass (core.js:12481)
at createDirectiveInstance (core.js:12326)
at createViewNodes (core.js:13784)
at createRootView (core.js:13673)
at callWithDebugContext (core.js:15098)
at Object.debugCreateRootView [as createRootView] (core.js:14381)
at ComponentFactory_.create (core.js:11278)
at ComponentFactoryBoundToModule.create (core.js:4030)
at ApplicationRef.bootstrap (core.js:5865)
View_AppComponent_Host_0 @ AppComponent_Host.ngfactory.js? [sm]:1
AppComponent_Host.ngfactory.js? [sm]:1 ERROR CONTEXT DebugContext_
View_AppComponent_Host_0 @ AppComponent_Host.ngfactory.js? [sm]:1
main.ts:11 TypeError: Stimulsoft.Viewer.StiViewerOptions is not a constructor
at new AppComponent (app.component.ts:18)
at createClass (core.js:12481)
at createDirectiveInstance (core.js:12326)
at createViewNodes (core.js:13784)
at createRootView (core.js:13673)
at callWithDebugContext (core.js:15098)
at Object.debugCreateRootView [as createRootView] (core.js:14381)
at ComponentFactory_.create (core.js:11278)
at ComponentFactoryBoundToModule.create (core.js:4030)
at ApplicationRef.bootstrap (core.js:5865)
I've attached sample project
thanks
Attachments
Show-repo-Angular-Pack.zip
(1.8 MiB) Downloaded 122 times
Lech Kulikowski
Posts: 6304
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeError: Cannot read property 'length' (2019.1)

Post by Lech Kulikowski »

Hello,

We are working on the issue. We will let you know about the result.

We have reproduced the problem, it occurs only if we use .pack.js scripts. At the moment you can turn off the option of packing scripts, in this case, your project should work correctly

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

Re: Uncaught TypeError: Cannot read property 'length' (2019.1)

Post by Lech Kulikowski »

Hello,

The issue with packed files is fixed. The fix will be available in the next build.

Thank you.
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Uncaught TypeError: Cannot read property 'length' (2019.1)

Post by mrapi »

ok.thanks
Lech Kulikowski
Posts: 6304
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeError: Cannot read property 'length' (2019.1)

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply