angular2-wizard icon indicating copy to clipboard operation
angular2-wizard copied to clipboard

Exception when running in production mode

Open mariannafld opened this issue 7 years ago • 11 comments

Hello, Wizard in ng serve --o works perfect, but in production mode ng build --prod, throws exception

ERROR TypeError: p.ngOnInit is not a function
    at main.593d15b004653eafc611.bundle.js:formatted:11116

at the transpiled code

Ka["\u0275ted"](-1, null, ["\n"]))], function(t, e) {
                var n = e.component;
                t(e, 3, 0),
                t(e, 7, 0, "Step 1: Define Channel"),
                t(e, 10, 0),
                t(e, 14, 0, "Step 2: Configure Channel"),
                t(e, 17, 0, Ka["\u0275nov"](e, 10).defineChannelForm, n.channelMode)
            }, null)

Thank you

mariannafld avatar Jan 11 '18 08:01 mariannafld

Even I am facing similar issue with wizardComponent access specifiers

Version: ng->5.0.0 cli->1.6.3 "angular2-wizard": "^0.2.2",

If I run production command "ng build -prod" I am getting below errors.

ERROR in node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(4,30): : Property 'steps' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(12,30): : Property 'isCompleted' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(13,89): : Property 'hasPrevStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(13,89): : Property 'activeStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,86): : Property 'activeStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,119): : Property 'hasNextStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,119): : Property 'activeStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(15,90): : Property 'activeStep' is private and only accessible within class 'WizardComponent'. node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(15,123): : Property 'hasNextStep' is private and only accessible within class 'WizardComponent'.

Please give me some solution ASAP to overcome this or could you please tell me the different version to update the current Wizard.

vinodkumar526 avatar Jan 23 '18 10:01 vinodkumar526

vinodkumar526, Hi I tried to find a solution with no luck and I switched to angular material stepper. It works perfect in development and production.

mariannafld avatar Jan 23 '18 13:01 mariannafld

@maiyaporn do you have any suggestion for using in prod mode? i am facing the same .ngOnInit is not a function in prod mode

muneer-memon avatar Feb 12 '18 23:02 muneer-memon

Any suggestions @maiyaporn? Or should we just bin this component in favor for material stepper as @mariannafld mentioned???

roblawford avatar May 08 '18 10:05 roblawford

Any suggestions?

ynnr85 avatar Jun 04 '18 07:06 ynnr85

Hi, someone forked this repo and resolved this issue. it gives no error on prod mode. https://github.com/Zwapgrid/angular2-wizard

muneer-memon avatar Jun 04 '18 22:06 muneer-memon

@muneer-memon Sure ? then why cant they(owner) resolve this.

k11k2 avatar Jul 18 '18 13:07 k11k2

@AlwaysAbhl001 you should ask this question to the owner

muneer-memon avatar Jul 18 '18 23:07 muneer-memon

Hi, someone forked this repo and resolved this issue. it gives no error on prod mode. https://github.com/Zwapgrid/angular2-wizard

Thanks @muneer-memon for this link. The README in that repo also refers to original angular2-wizard only. How do I install and use this variant in my project to get rid of the production mode issue? Your help in throwing some light in the right direction is much appreciated :)

satnar avatar Jul 03 '19 08:07 satnar

@muneer-memon Sure ? then why cant they(owner) resolve this. because the person fixed it has changed its package name and owner doesnt want that.

muneer-memon avatar Jul 03 '19 23:07 muneer-memon

Hi, someone forked this repo and resolved this issue. it gives no error on prod mode. https://github.com/Zwapgrid/angular2-wizard

Thanks @muneer-memon for this link. The README in that repo also refers to original angular2-wizard only. How do I install and use this variant in my project to get rid of the production mode issue? Your help in throwing some light in the right direction is much appreciated :)

you can either use that package or get that code in your local project if you need further customization(which i did)

muneer-memon avatar Jul 03 '19 23:07 muneer-memon