我使用jspm安裝了aurelia-breadcrumbs。 config.js文件中有一個映射項:Aurelia插件路徑錯誤
"heruan/aurelia-breadcrumbs": "github:heruan/[email protected]"
的config.js也有一個路徑條目:
"github:*": "jspm_packages/github/*"
在我的項目目錄下jspm_packages/github上/ heruan,有文件/文件夾涉及aurelia-麪包屑。
在我的自舉配置我:
aurelia.use
.standardConfiguration()
.feature('src/resources')
.developmentLogging()
.plugin("heruan/aurelia-breadcrumbs");
然而,該插件沒有被正確映射,它無法找到奧裏利亞-breadcrumbs.js文件(錯誤404在瀏覽器中)。
Uncaught (in promise) Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:7987/heruan/aurelia-breadcrumbs.js
當我看到在Chrome開發者工具的「源」選項卡,麪包屑插件不再受jspm_packages/github上出現。
我錯過了什麼?
如果更改config中的行,會發生什麼情況。 js「heruan/aurelia-breadcrumbs 「:」github:heruan/[email protected]「到」aurelia-breadcrumbs「:」github:heruan/[email protected]「? –
我最好的猜測是,需要將一些配置信息添加到jspm註冊表中,以便爲此插件教授JSPM/SystemJS需要做什麼才能使此插件有效。 –
我也這麼認爲,我試着完全按照你的建議切換配置,但後來我得到了與另一個URL相同的錯誤。我剛剛放棄使用這個插件。目前我沒有時間進行調試。它看起來並不像在6個月內被觸及,並且考慮到Aurelia多久經常變化,這讓我相信它可能會被放棄。 – Bitfiddler