Angular package work locally but not work after deploy

限于喜欢 提交于 2021-01-07 01:43:36

问题


I use ng2-jalali-date-picker and jalali-moment in angular application.

my date picker work in local machine but i build and deploy application in server with this command : ng build --prod my components that contain date picker not loaded and my page not rendered.

I get this errors only in server:

ERROR TypeError: Cannot read property 'gregorian' of undefined

ERROR TypeError: Cannot read property 'hideInputContainer' of undefined

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'format' of undefined

I not any idea for this errors.


回答1:


I had a similar issue with my angular app. I resolved it with this command, I hope it will work for you as well.

ng build --prod --aot=false --build-optimizer=false --no-progress


来源:https://stackoverflow.com/questions/53630358/angular-package-work-locally-but-not-work-after-deploy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!