Page 1 of 1

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

Posted: Thu Dec 20, 2018 5:17 pm
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

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

Posted: Sat Dec 22, 2018 12:52 pm
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.

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

Posted: Thu Dec 27, 2018 7:55 am
by Lech Kulikowski
Hello,

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

Thank you.

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

Posted: Thu Dec 27, 2018 3:58 pm
by mrapi
ok.thanks

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

Posted: Fri Dec 28, 2018 1:17 am
by Lech Kulikowski
Hello

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

Thank you.