javascript - Aurelia - 无法使用 typescript skeeton 使 asp net core 工作

标签 javascript asp.net-mvc asp.net-core installation aurelia

我正在尝试使用 github 上的骨架项目启动并运行 aurelia。查看链接https://github.com/aurelia/skeleton-navigation .

我正在使用面向 ASP.NET Core 的骨架,使用名为“sculpture-typescript-aspnetcore”的 typescript 。

我下载了骨架项目,然后在最新更新的 Visual Studio 2017 中打开它。

当我构建项目时,我收到 70 个错误,主要是 typescript 错误。所有错误看起来都类似于:

Severity Code Description Project File Line Suppression State Error TS2304 Cannot find name 'by'. skeleton (tsconfig project) D:\skeleton-typescript-aspnetcore\src\skeleton\test\e2e\src\skeleton.po.ts 12 Active

Severity Code Description Project File Line Suppression State Error TS2307 Cannot find module 'aurelia-router'. skeleton (tsconfig project) D:\skeleton-typescript-aspnetcore\src\skeleton\src\app.ts 1 Active

Severity Code Description Project File Line Suppression State Error TS6059 File 'D:/skeleton-typescript-aspnetcore/src/skeleton/test/unit/users.spec.ts' is not under 'rootDir' 'D:/skeleton-typescript-aspnetcore/src/skeleton/src/'. 'rootDir' is expected to contain all source files. skeleton (tsconfig project) 1 Active

我是 Typescript 新手,也是 aurelia 和 ASP.NET Core 的新手。

我在这里遗漏了一些东西还是框架项目只是被破坏了?

更新:

这似乎与 typescript 有关,因为我可以使用骨架项目“sculpture-esnext-aspnetcore”让 ASP.NET Core 项目与 esnext 一起使用。在这里,我简单地下载了该项目并运行它 - 没有别的。我想 typescript 项目也应该是这样的。所以对我来说,骨架项目“骷髅-typescript-aspnetcore”可能不起作用?

最佳答案

您应该检查 configuration步骤。

请确保您的环境设置正确。

首先,无论您是否使用 Visual Studio,都需要满足一组先决条件。请确保在继续之前安装这些先决条件。

NodeJS >=4.0.0 这提供了构建工具运行的平台。这可以从 NodeJS 网站下载并安装。

NPM >=3.0.0 这是随 NodeJS 一起安装的,但如果您安装 4.x 版本的 NodeJS,则可能需要更新它。

jspmgulp打字。安装 NodeJS 和 NPM 后,可以通过从命令行运行 npm install -g jspm gulptypings 来安装这三个工具

其他先决条件:

  • Visual Studio 2015 更新 3
  • ASP.NET Core必须下载并安装。路线
    这样做是here .

您可以从以下链接找到分步流程: https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-typescript-aspnetcore/src/skeleton

关于javascript - Aurelia - 无法使用 typescript skeeton 使 asp net core 工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44624696/

相关文章:

asp.net-mvc - 使用 MVC 和 OAuthWebSecurity 登录 Twitter

javascript - 部分 View 上的 ASP.net Razor 刷新返回主页

asp.net - 在 ASP.NET MVC 中将集合传递给 EditorFor

javascript - 使用 Angular 标记列表中的修改元素

javascript - 谷歌浏览器插件 : How to get domain from URL (tab. 网址)

c# - 同一个库之间的调用不明确?

asp.net-core - 如何在 ASP.NET Core 的 OpenIdConnectOptions 上设置 redirect_uri 参数

oauth - 在 AddOAuth OnCreatingTicket 期间返回 AuthenticateResult.Fail 结果

javascript - 带有固定顶栏的移动滑动菜单

javascript - 有没有办法在 firebase 中减少请求?