如何弄清楚为什么在Angular中部署失败? [英] How to figure out why deployment failed in Angular?

查看:55
本文介绍了如何弄清楚为什么在Angular中部署失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打包Angular项目时,我将指令输入到cmd:ng build --prod,几分钟后,我通过IIS部署了该项目.但是我无法浏览这个项目.控制台出现问题.

When I was trying to pack up the Angular project I input the directive to cmd: ng build --prod, after few minutes, I deployed the project by IIS. But I can't visit the project in brower. There is something wrong in console.

什么是rn?我真的不知道我再次收拾行装,但使用指令:ng build.一切都成功了.但是项目的大小大于ng build --prod. 我该怎么办才能找出错误?

What are r and n? I really don't know. I pack up again, but use the directive: ng build. And everything successful. But the size of the project is bigger than ng build --prod. What should I do to figure out the error?

推荐答案

尝试获取源地图和捆绑包,然后找出错误的确切位置.您可以在本地执行此操作,以与AOTsourcemaps

Try getting the source map along with the bundles and then figure out where exactly the error is. You can do this on your local to run with AOT along with sourcemaps

ng serve --aot -sourcemaps

如果未生成源地图,则可以在此处链接获取它们.

If your source maps are not getting generated, you can follow the link here to get them.

这篇关于如何弄清楚为什么在Angular中部署失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆