我正在尝试从存储库启动服务器,但由于以下错误而无法启动它:
ember serve
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
mirage/factories/page.js: line 4, col 42, 'faker' is not defined.
1 error
mirage/scenarios/default.js: line 7, col 19, 'domain' is defined but never used.
mirage/scenarios/default.js: line 13, col 105, Missing semicolon.
mirage/scenarios/default.js: line 5, col 7, 'ads' is defined but never used.
3 errors
===== 2 JSHint Errors
page.js:
import { Factory } from 'ember-cli-mirage';
export default Factory.extend({
permalink: function() { return '/' + faker.lorem.words(1); }
});
这里有什么问题?我还使用 npm 手动安装了 faker,但它似乎根本没有任何效果,我仍然遇到这个错误。