jQWidgets Forums

jQuery UI Widgets Forums Angular ng build –prod doesn't work

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • ng build –prod doesn't work #98252

    Liam
    Participant

    Hello, I’ve followed instructions from here to create a new angular app from scratch.

    ng serve works fine
    ng build works fine
    ng build —-prod doesn’t work. Getting the following error messages :

    ERROR in : Cannot determine the module for class jqxBulletChartComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxbulletchart.ts! Add jqxBulletChartComponent to the NgModule to fix it.
    Cannot determine the module for class jqxButtonGroupComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxbuttongroup.ts! Add jqxButtonGroupComponent to the NgModule to fix it.
    Cannot determine the module for class jqxButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxbuttons.ts! Add jqxButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxCalendarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxcalendar.ts! Add jqxCalendarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxChartComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxchart.ts! Add jqxChartComponent to the NgModule to fix it.
    Cannot determine the module for class jqxCheckBoxComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxcheckbox.ts! Add jqxCheckBoxComponent to the NgModule to fix it.
    Cannot determine the module for class jqxColorPickerComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxcolorpicker.ts! Add jqxColorPickerComponent to the NgModule to fix it.
    Cannot determine the module for class jqxComboBoxComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxcombobox.ts! Add jqxComboBoxComponent to the NgModule to fix it.
    Cannot determine the module for class jqxComplexInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxcomplexinput.ts! Add jqxComplexInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDataTableComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdatatable.ts! Add jqxDataTableComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDateTimeInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdatetimeinput.ts! Add jqxDateTimeInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDockingComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdocking.ts! Add jqxDockingComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDockingLayoutComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdockinglayout.ts! Add jqxDockingLayoutComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDockPanelComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdockpanel.ts! Add jqxDockPanelComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDragDropComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdragdrop.ts! Add jqxDragDropComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDrawComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdraw.ts! Add jqxDrawComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDropDownButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdropdownbutton.ts! Add jqxDropDownButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxDropDownListComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxdropdownlist.ts! Add jqxDropDownListComponent to the NgModule to fix it.
    Cannot determine the module for class jqxEditorComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxeditor.ts! Add jqxEditorComponent to the NgModule to fix it.
    Cannot determine the module for class jqxExpanderComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxexpander.ts! Add jqxExpanderComponent to the NgModule to fix it.
    Cannot determine the module for class jqxFileUploadComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxfileupload.ts! Add jqxFileUploadComponent to the NgModule to fix it.
    Cannot determine the module for class jqxFormattedInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxformattedinput.ts! Add jqxFormattedInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxGaugeComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxgauge.ts! Add jqxGaugeComponent to the NgModule to fix it.
    Cannot determine the module for class jqxGridComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxgrid.ts! Add jqxGridComponent to the NgModule to fix it.
    Cannot determine the module for class jqxInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxinput.ts! Add jqxInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxKanbanComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxkanban.ts! Add jqxKanbanComponent to the NgModule to fix it.
    Cannot determine the module for class jqxKnobComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxknob.ts! Add jqxKnobComponent to the NgModule to fix it.
    Cannot determine the module for class jqxLayoutComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxlayout.ts! Add jqxLayoutComponent to the NgModule to fix it.
    Cannot determine the module for class jqxLinearGaugeComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxlineargauge.ts! Add jqxLinearGaugeComponent to the NgModule to fix it.
    Cannot determine the module for class jqxLinkButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxlinkbutton.ts! Add jqxLinkButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxListBoxComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxlistbox.ts! Add jqxListBoxComponent to the NgModule to fix it.
    Cannot determine the module for class jqxListMenuComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxlistmenu.ts! Add jqxListMenuComponent to the NgModule to fix it.
    Cannot determine the module for class jqxLoaderComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxloader.ts! Add jqxLoaderComponent to the NgModule to fix it.
    Cannot determine the module for class jqxMaskedInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxmaskedinput.ts! Add jqxMaskedInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxMenuComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxmenu.ts! Add jqxMenuComponent to the NgModule to fix it.
    Cannot determine the module for class jqxNavBarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxnavbar.ts! Add jqxNavBarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxNavigationBarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxnavigationbar.ts! Add jqxNavigationBarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxNotificationComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxnotification.ts! Add jqxNotificationComponent to the NgModule to fix it.
    Cannot determine the module for class jqxNumberInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxnumberinput.ts! Add jqxNumberInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxPanelComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxpanel.ts! Add jqxPanelComponent to the NgModule to fix it.
    Cannot determine the module for class jqxPasswordInputComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxpasswordinput.ts! Add jqxPasswordInputComponent to the NgModule to fix it.
    Cannot determine the module for class jqxPivotDesignerComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxpivotdesigner.ts! Add jqxPivotDesignerComponent to the NgModule to fix it.
    Cannot determine the module for class jqxPivotGridComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxpivotgrid.ts! Add jqxPivotGridComponent to the NgModule to fix it.
    Cannot determine the module for class jqxPopoverComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxpopover.ts! Add jqxPopoverComponent to the NgModule to fix it.
    Cannot determine the module for class jqxProgressBarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxprogressbar.ts! Add jqxProgressBarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxRadioButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxradiobutton.ts! Add jqxRadioButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxRangeSelectorComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxrangeselector.ts! Add jqxRangeSelectorComponent to the NgModule to fix it.
    Cannot determine the module for class jqxRatingComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxrating.ts! Add jqxRatingComponent to the NgModule to fix it.
    Cannot determine the module for class jqxRepeatButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxrepeatbutton.ts! Add jqxRepeatButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxResponsivePanelComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxresponsivepanel.ts! Add jqxResponsivePanelComponent to the NgModule to fix it.
    Cannot determine the module for class jqxRibbonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxribbon.ts! Add jqxRibbonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxSchedulerComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxscheduler.ts! Add jqxSchedulerComponent to the NgModule to fix it.
    Cannot determine the module for class jqxScrollBarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxscrollbar.ts! Add jqxScrollBarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxScrollViewComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxscrollview.ts! Add jqxScrollViewComponent to the NgModule to fix it.
    Cannot determine the module for class jqxSliderComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxslider.ts! Add jqxSliderComponent to the NgModule to fix it.
    Cannot determine the module for class jqxSortableComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxsortable.ts! Add jqxSortableComponent to the NgModule to fix it.
    Cannot determine the module for class jqxSplitterComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxsplitter.ts! Add jqxSplitterComponent to the NgModule to fix it.
    Cannot determine the module for class jqxSwitchButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxswitchbutton.ts! Add jqxSwitchButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTabsComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtabs.ts! Add jqxTabsComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTagCloudComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtagcloud.ts! Add jqxTagCloudComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTextAreaComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtextarea.ts! Add jqxTextAreaComponent to the NgModule to fix it.
    Cannot determine the module for class jqxToggleButtonComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtogglebutton.ts! Add jqxToggleButtonComponent to the NgModule to fix it.
    Cannot determine the module for class jqxToolBarComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtoolbar.ts! Add jqxToolBarComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTooltipComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtooltip.ts! Add jqxTooltipComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTreeComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtree.ts! Add jqxTreeComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTreeGridComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtreegrid.ts! Add jqxTreeGridComponent to the NgModule to fix it.
    Cannot determine the module for class jqxTreeMapComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxtreemap.ts! Add jqxTreeMapComponent to the NgModule to fix it.
    Cannot determine the module for class jqxValidatorComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxvalidator.ts! Add jqxValidatorComponent to the NgModule to fix it.
    Cannot determine the module for class jqxWindowComponent in E:/temp/jqwidgets-angular-cli-app/node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxwindow.ts! Add jqxWindowComponent to the NgMod] isule to fix it.

    ng –version

    Angular CLI: 1.6.4
    Node: 8.9.4
    OS: win32 x64
    Angular: 5.2.0
    … animations, common, compiler, compiler-cli, core, forms
    … http, language-service, platform-browser
    … platform-browser-dynamic, router

    @angular/cli: 1.6.4
    @angular-devkit/build-optimizer: 0.0.38
    @angular-devkit/core: 0.0.25
    @angular-devkit/schematics: 0.0.48
    @ngtools/json-schema: 1.1.0
    @ngtools/webpack: 1.9.4
    @schematics/angular: 0.1.13
    @schematics/schematics: 0.0.13
    typescript: 2.5.3
    webpack: 3.10.0

    Thank you

    ng build –prod doesn't work #98280

    Gary
    Participant

    I ran into the same problem as above.

    To work around it I added all the jqx modules definitions into app.module.ts under section @NgModule({declarations…. and it worked.
    Clearly, I don’t think this is how it should work. I would like to see the modules brought in based upon import statements in components.
    At least only the JQX components, I use in the application.

    Used the following build commands with angular-cli:

    ng serve -dev
    ng serve -prod
    ng serve -prod -aot

    Between Development and production build mode the total size went from 21MB to 2.08MB it looks like the tree-shaking capabilities are working.
    Still looking at my builds.

    Gary

    ng build –prod doesn't work #98283

    Ivo Zhulev
    Participant

    Hi gyes,

    This is because the compiler got a lot more strict. Now only the used .ts files must be compiled.
    The problem comes from the tsconfig.json file:

    "include": [
        "src/**/*",
        "node_modules/jqwidgets-scripts/jqwidgets-ts/**/*"  <=== Here
    ]

    In that line, we include all the jQWidgets .ts files, and when we want to build for production it will give an error because it wants only the files we are using to be included.
    So the solution:

    "include": [
      "src/**/*"
    ],
    "files": [
       // Here you must include all the <code>.ts</code> files you are using from the jQWidgets library.
      "node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxgrid.ts"
      "node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxchart.ts"
    ]

    Our docs will be updated soon!

    Best Regards,
    Ivo

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

    ng build –prod doesn't work #98293

    Gary
    Participant

    Ivo,

    Made recommended changes and it works for me.

    Thanks,
    Gary

    ng build –prod doesn't work #98305

    Liam
    Participant

    Also works for me.
    Thank you

    ng build –prod doesn't work #98352

    Ivo Zhulev
    Participant
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.