我是Aurelia的初學者,學習將代碼塊放在一起。Aurelia沒有這樣的文件或目錄aurelia-fetch-client.js
itemWithPicture.js
import "fetch";
import {HttpClient, json} from "aurelia-fetch-client";
let httpClient = new HttpClient();
export class ItemWithPicture {
constructor() {
this.heading = "Item with Picture";
}
}
我得到的錯誤是
{ [Error: ENOENT: no such file or directory, open 'C:\GitRepo\pictureRecord\n
ode_modules\aurelia-fetch-client.js']
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\GitRepo\\pictureRecord\\node_modules\\aurelia-fetch-client.js',
moduleTree: [ 'itemWithPicture' ],
fileName: 'C:/GitRepo/pictureRecord/src/itemWithPicture.js' },
duration: [ 0, 2993168 ],
time: 1470835605761 }
我想出了這個問題。需要在config.js下爲babeloptions添加「es7.decorators」。 – Celeste
請發表您的評論作爲您的問題的答案,以便其他人可以更容易地找到它,並且如果它對他們有用,也可以使用它提高效果:-) – Oliver