jQuery UI Widgets Forums Angular JQXLite is not defined

This topic contains 3 replies, has 3 voices, and was last updated by  Ivo Zhulev 3 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • JQXLite is not defined #105006

    abilbaolavieja
    Participant

    So I’m using jqxChartComponents, using the jqwidgets-ng package and exerything works fine while im testing and even building for development. However when I build my application for production with
    ng build –prod –base-href .
    and I deploy it to a tomcat server, the charts stop working and I get the following error on the console

    main.d414d12cf6aaddaf809d.js:1 ERROR Error: Uncaught (in promise): ReferenceError: JQXLite is not defined
    ReferenceError: JQXLite is not defined
    at new t (main.d414d12cf6aaddaf809d.js:1)
    at Mi (main.d414d12cf6aaddaf809d.js:1)
    at ji (main.d414d12cf6aaddaf809d.js:1)
    at la (main.d414d12cf6aaddaf809d.js:1)
    at _a (main.d414d12cf6aaddaf809d.js:1)
    at ma (main.d414d12cf6aaddaf809d.js:1)
    at la (main.d414d12cf6aaddaf809d.js:1)
    at ia (main.d414d12cf6aaddaf809d.js:1)
    at Object.xa [as createRootView] (main.d414d12cf6aaddaf809d.js:1)
    at e.create (main.d414d12cf6aaddaf809d.js:1)
    at P (polyfills.8bbb231b43165d65d357.js:1)
    at P (polyfills.8bbb231b43165d65d357.js:1)
    at polyfills.8bbb231b43165d65d357.js:1
    at e.invokeTask (polyfills.8bbb231b43165d65d357.js:1)
    at Object.onInvokeTask (main.d414d12cf6aaddaf809d.js:1)
    at e.invokeTask (polyfills.8bbb231b43165d65d357.js:1)
    at t.runTask (polyfills.8bbb231b43165d65d357.js:1)
    at g (polyfills.8bbb231b43165d65d357.js:1)
    at t.invokeTask [as invoke] (polyfills.8bbb231b43165d65d357.js:1)
    at m (polyfills.8bbb231b43165d65d357.js:1)

    this only happens when I build for production, and this error only happens when I try to load any page with a chart on it. How could I fix it?

    JQXLite is not defined #105007

    Martin
    Participant

    Hello abilbaolavieja,

    Could you, please, try to reinstall the latest version of jqwidgets-ng (delete node_modules and the dependency in package.json before that) and check of you still encounter this issue.
    If this doesn’t help, please, send us an example of how you are using the chart.
    Thank you!

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    JQXLite is not defined #105023

    abilbaolavieja
    Participant

    Hi Martin

    I reinstalled jqwidgets-ng 2 or 3 times before posting this questions, and the issue remained. However I decided to build my project with this command
    ng build –prod –base-href=. –aot=false –buildOptimizer=false
    and it is working now. If you still need to check how I’m using the chart here is the code
    TS file

    
    selectedServerSessionSpaceObjectsLoadTime: SpaceObjectLoadTime[]; 
    xAxis: any = {
        dataField: 'date',
        rangeSelector: {
          size: 100,
          dataField: 'loadTime',
          showGridLines: false
        }
      };
      padding: any = { left: 50, top: 5, right: 50, bottom: 5 };
    
      colorScheme = 'scheme01';
      seriesGroups: any[] = [{
        type: 'line',
        series: [{
          dataField: 'loadTime',
          displayText: 'Loading Time (ms)'
        }]
      }];
    getWidth() {
        return '1200';
      }
    getHeight() {
        return '800';
      }
    

    HTML file:

    
    <jqxChart #sessionChart id="space-objects-chart"
      [width]="getWidth()" [height]="getHeight()"
      [colorScheme]="colorScheme"
      [source]="selectedServerSessionSpaceObjectsLoadTime"
      [xAxis]="xAxis"
      [seriesGroups]="seriesGroups"
      [padding]="padding"
      [title]="'Title'"
      [description]="''">
    
    </jqxChart>
    
    JQXLite is not defined #105078

    Ivo Zhulev
    Participant

    Hi abilbaolavieja,

    Can you please confirm you are using jqwidgets-ng version 7.2.1?

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.