Angular 2 CLI ng build --prod在生产服务器上导致不可预测的404

时间:2016-12-28 03:17:27

标签: angular angular-cli

使用Angular CLI,我尝试运行命令ng build -prod --base-href /dist只是为了在我的个人网站上测试我的应用程序的产品版本。但是,当我上传包含文件的目录时,我只会得到一堆404和不可预测的问题。当我去http://<the-url>/dist时,我明白了:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/main.a700d1a79f497ebd40b5.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/inline.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/scripts.bd14ddfbf2a53470a559.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/inline.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/styles.80fef94eb489169fb077.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/scripts.bd14ddfbf2a53470a559.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<url-omitted>/main.a700d1a79f497ebd40b5.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)

我在接下来的几天内对此进行整理是非常关键的,所以有人遇到过这个问题并且有解决它的运气吗?

我应该注意我也使用了角度cli版1.0.0-beta.16

谢谢!

0 个答案:

没有答案