2017-08-04 13 views
0

ASP.NET Coreを使用して私の最初のAurelia Hello Worldプロジェクトをセットアップしようとしています。上記のエラーを越えることはできません。Aurelia - get TypeError:palModule.initializeは関数ではありません

3ファイル、index.htmlを、app.html、app.js:

Index.htmlと:

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
    <meta charset="utf-8" /> 
 
    <title></title> 
 
</head> 
 
<body aurelia-app> 
 
    <script src="jspm_packages/system.js"></script> 
 
    <script src="config.js"></script> 
 
    <script> 
 
     System.import("aurelia-bootstrapper"); 
 
    </script> 
 
</body> 
 
</html>

app.html:

<template> 
    <div>${message}</div> 
</template> 

app.js:

export class App { 
    constructor() { 
     this.message = "Hello from Aurelia"; 
    } 
} 

ASP.NETコアStartUp.cs:

public class Startup 
    { 
     // This method gets called by the runtime. Use this method to add services to the container. 
     // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 
     public void ConfigureServices(IServiceCollection services) 
     { 
     } 

     // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 
     public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) 
     { 
      loggerFactory.AddConsole(); 

      if (env.IsDevelopment()) 
      { 
       app.UseDeveloperExceptionPage(); 
      } 

      app.UseDefaultFiles(); 
      app.UseStaticFiles(); 

      app.Run(async (context) => 
      { 
       //await context.Response.WriteAsync("Hello World!"); 
      }); 
     } 
    } 
} 

そうでない場合は、標準のすべてのもの。私はあなたがこの意志は異なる環境でフレームワークを実行することを可能にするのでaurelia-pal-browserを実行する必要があると思う Error:

+0

あなたは自分の[スケルトンプロジェクト](https://github.com/aurelia/skeleton-navigation)を見たことがありますか?始めるのに役立つかもしれません。 – peinearydevelopment

答えて

1

jspm install aurelia-framework 
jspm install aurelia-bootstrapper 

かなり基本的なしかし、エラーを取得:オーレリアをインストールするには、次を実行しました。

は、このコードを試してみてください。

jspm install npm:aurelia-pal-browser 
+0

ありがとう!初めての作業。 – crispyb99

+0

いつもようこそ! – RajeeshMenoth

+0

+1 PluralsightのAureliaコースでScott AllenのBuilding Appsを使い、この同じ問題に遭遇しました。私はスケルトンプロジェクトでAureliaのアプリケーションを構築しましたが、今ではそれを基礎から構築しようとしています。 – steveo

関連する問題