Tôi là người mới bắt đầu học Aurelia và học cách ghép các đoạn mã lại với nhau.Aurelia không có tập tin hoặc thư mục như vậy 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";
}
}
Các lỗi tôi nhận được
{ [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 }
Tôi đã tìm ra sự cố. Cần thêm "es7.decorators" dưới config.js cho babeloptions. – Celeste
Xin vui lòng gửi bình luận của bạn như là câu trả lời cho câu hỏi của bạn, để những người khác có thể dễ dàng tìm thấy nó và cũng upvote nó nếu nó hữu ích cho họ :-) – Oliver