JavaScript错误的简单奥里利亚ASP.Net 5.0 RC1安装 [英] Javascript error in simple Aurelia ASP.Net 5.0 RC1 Setup

查看:228
本文介绍了JavaScript错误的简单奥里利亚ASP.Net 5.0 RC1安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装在ASP.Net 5.0 RC1一个非常基本的奥里利亚项目。我做一个基本的初始设置后得到以下JavaScript错误。我使用的打字稿。

I am attempting to setup a very basic Aurelia project in ASP.Net 5.0 RC1. I am getting the following JavaScript error after doing a basic initial setup. I am using TypeScript.

Unhandled promise rejection Error: XHR error (404 Not Found) loading  http://localhost:5392/core-js.js
    Error loading http://localhost:5392/core-js.js as "core-js" from http://localhost:5392/jspm_packages/npm/aurelia-loader@1.0.0-beta.1/aurelia-loader.js
    at o (http://localhost:5392/jspm_packages/system.js:4:12694)
    at XMLHttpRequest.s.onreadystatechange (http://localhost:5392/jspm_packages/system.js:4:13219)
    (anonymous function) @ es6.promise.js:138

我做的设置如下。

The setup I did is as follows.


  1. 创建空的ASP.Net 5.0模板。

  2. 从安装的NuGet Microsoft.AspNet.StaticFiles 并设置 app.UseFileServer

  3. git的庆典运行 JSPM的init 使用以下设置。

  1. Create Empty ASP.Net 5.0 template.
  2. Install Microsoft.AspNet.StaticFiles from nuget and set up app.UseFileServer.
  3. From git bash run jspm init with the following settings.

的package.json文件不存在,创建它吗? [是]:
你想JSPM至preFIX下JSPM的JSPM的package.json属性? [是]:
输入服务器BASEURL(公共文件夹路径)[./]:./wwwroot
进入JSPM包文件夹[wwwroot的\\ jspm_packages]:
输入配置文件路径[wwwroot的\\ config.js]:
配置文件的wwwroot \\ config.js不存在,创建它吗? [是]:
输入客户BASEURL(公用文件夹URL)[/]:
你希望使用transpiler? [是]:
这ES6 transpiler你想使用,巴贝尔,打字稿或Traceur? [巴别塔]:打字稿

git的庆典运行 JSPM安装Aurelia路上的框架 JSPM安装奥里利亚-引导程序

有没有一步,我在此设置丢失?

Is there a step I am missing in this setup?

推荐答案

看起来这是一个已知问题。解决方法是有点简单。如果在地图部分的 config.js 顶部添加核心JS 映射,它修复它。

It seems like this is a known issue. The fix is somewhat simple. If you add a core-js mapping at the top of the map section in config.js, it fixes it.

例如,

map: {
    "core-js": "npm:core-js@1.2.6",
    // other mappings
}

这篇关于JavaScript错误的简单奥里利亚ASP.Net 5.0 RC1安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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