如何在Apache服务器中部署Web应用程序Aurelia? [英] How to deploy a web application Aurelia in an Apache server?

查看:98
本文介绍了如何在Apache服务器中部署Web应用程序Aurelia?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要尝试,我使用了最新的"aurelia-skeleton-navigation 1.0.0-beta.1.0.1".

To try, I used the latest "aurelia-skeleton-navigation 1.0.0-beta.1.0.1".

要在Apache服务器中部署Aurelia Web应用程序,我使用了"gulp导出"命令,并将导出"的内容复制到了"www/html/myapp"目录中!

To deploy the Aurelia web application in an Apache server I used "gulp export" command and I copied the contents of the "export" in the "www/html/myapp" directory !

因此,欢迎"选项卡可以正常工作,但不能使用"github用户"选项卡!
错误是:

So, the welcome tab works fine, but not the "github users" tab !
The error is :

错误[应用程序路由器]错误:XHR错误(未找到404)正在加载 http://localhost/myapp/jspm_packages/github/github/fetch时出错@ 0.10.1.js 作为 http:"github:github/fetch@0.10.1"//localhost/myapp/dist/users.js 堆栈跟踪: o @ http://localhost/myapp/jspm_packages/system.js:4:12750 e/http://localhost/myapp/jspm_packages/system.js:4:13275

ERROR [app-router] Error: XHR error (404 Not Found) loading http://localhost/myapp/jspm_packages/github/github/fetch@0.10.1.js Error loading http://localhost/myapp/jspm_packages/github/github/fetch@0.10.1.js as "github:github/fetch@0.10.1" from http://localhost/myapp/dist/users.js Stack trace: o@http://localhost/myapp/jspm_packages/system.js:4:12750 e/http://localhost/myapp/jspm_packages/system.js:4:13275

我错过了什么?

推荐答案

基于错误消息,我可以说导出文件夹中缺少fetch polyfill.

Based on the error message I can say that the fetch polyfill is missing from the exported folder.

要解决此问题,请编辑文件build/export.json.替换行

To fix that, edit the file build/export.json. Replace the lines

"jspm_packages/github/github/fetch@0.9.0.js",
"jspm_packages/github/github/fetch@0.9.0/fetch.js"

引用了正确的版本(在您的情况下为0.10.1):

with references to the correct version (0.10.1 in your case):

"jspm_packages/github/github/fetch@0.10.1.js",
"jspm_packages/github/github/fetch@0.10.1/fetch.js"

然后再次运行gulp export命令,并确保现在将fetch文件复制到jspm_packages.

Then run the gulp export command again and make sure that fetch files are now copied into jspm_packages.

已经有一个修复该问题的拉取请求.

这篇关于如何在Apache服务器中部署Web应用程序Aurelia?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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