https://www.danylkoweb.com/Blog/getting-started-with-aurelia-in-aspnet-mvc-EH、手順3-5の手順に従って、Aureliaをasp.net mvcコアアプリケーションにインストールしますnpm install、jspm init、jspm install aurelia-frameworkおよびjspm install aurelia-bootstrapper)を実行します。jspm_packagesフォルダから "aurelia-pal-browser"をSystemJS(Aurelia with jspm)にロードできない
私の「スタートアップコードは」ちょうど今のところ次のようになります。
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
SystemJS.import('aurelia-bootstrapper');
</script>
私はアウレリアリソース(JSファイル)の多くは下にロードされているクロームのdevのツールで見ることができるアプリケーションを実行 /jspm_packages/NPMフォルダには、私はまた、このようなエラーが出る:
Uncaught (in promise) Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:39535/aurelia-pal-browser.js Error: XHR error (404 Not Found) loading http://localhost:39535/aurelia-pal-browser.js Error loading http://localhost:39535/aurelia-pal-browser.js
をSystemJSは自分のアプリケーションのルートにアウレリア-PAL-browser.jsを探し始めいくつかの理由。私はそれがjspm_packages \ npm \ [email protected]フォルダを見つけることができないと思いますが、そこにあり、config.jsファイルに同じバージョン番号があります。
全config.jsの私は、JSPMのコマンドを実行した後にそれを得たとして:
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: false,
paths: {
"npm:*": "jspm_packages/npm/*"
},
map: {
"aurelia-bootstrapper": "npm:[email protected]",
"aurelia-framework": "npm:[email protected]",
"npm:[email protected]": {
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-event-aggregator": "npm:[email protected]",
"aurelia-framework": "npm:[email protected]",
"aurelia-history": "npm:[email protected]",
"aurelia-history-browser": "npm:[email protected]",
"aurelia-loader-default": "npm:[email protected]",
"aurelia-logging-console": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-pal-browser": "npm:[email protected]",
"aurelia-polyfills": "npm:[email protected]",
"aurelia-router": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]",
"aurelia-templating-binding": "npm:[email protected]",
"aurelia-templating-resources": "npm:[email protected]",
"aurelia-templating-router": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-logging": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-loader": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-history": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-loader": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-metadata": "npm:[email protected]",
"aurelia-path": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-logging": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-path": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-event-aggregator": "npm:[email protected]",
"aurelia-history": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-route-recognizer": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-pal": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-loader": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-router": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-loader": "npm:[email protected]",
"aurelia-logging": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-path": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]"
}
}
});
感謝を!それは動作します!それがなぜ必要なのかを知ることは興味深いでしょう。そして、jspm、SystemJS、Aureliaのエラーですか?私はSystemJSと思う... :-) –
全く同じ問題があります。私には、SystemJSはbaseURLとパスを正しく組み合わせていないようです。どんな組み合わせであっても、正しいパスに解決できません。 – epitka
この解決策があなたのために働いておらず、あなたのconfig.jsを投稿してエラーメッセージを表示した場合は、おそらく余分な質問を作成してください。質問をここにリンクする –