Angular Uncaught TypeError: e is not a constructor after build --prod (work on ng serve)

后端 未结 2 1246
感动是毒
感动是毒 2021-02-20 15:59

I have a problem while uploading my angular application to production . The application works just fine in development and used to work before on production too.

To bui

相关标签:
2条回答
  • 2021-02-20 16:28

    we also got same issue.Once remove all the node modules and install one by one node modules.After installing every node module enter ng build --prod it may help.In one project we got that error in ngx password toggle node module.

    0 讨论(0)
  • 2021-02-20 16:39

    after a long time of trying, I discovered that there is an open bug at angular cli

    https://github.com/angular/angular-cli/issues/9929

    ng build --prod --base-href="/site/" --aot=false --build-optimizer=false

    and for now using --aot=false --build-optimizer=false temporarily solves the problem.

    Ill keep the post updated with official the information and solution that angular team will provide.

    0 讨论(0)
提交回复
热议问题