[英]Im getting a broccoli error when compiling
我運行ember並得到以下信息:
ember s
version: 2.4.2
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [TemplateCompiler] failed with:
Error: EEXIST: file already exists, symlink '/Users/myname/Documents/source-code/route-app/tmp/template_compiler-input_base_path-knvK6YsL.tmp/0/route-app/templates/components/event-form.js' -> '/Users/myname/Documents/source-code/route-app/tmp/template_compiler-output_path-nJ5NYRH1.tmp/route-app/templates/components/event-form.js'
at Error (native)
at Object.fs.symlinkSync (fs.js:897:18)
我手動創建了這些文件,但沒有使用ember g。 這是我的組件的hbs和js文件:
hbs文件:
<h2>Add New Event</h2>
<form {{action 'addEvent' on='submit'}}>
<div>
<label for="">Event Date</label>
{{input value=event.date}}
<label for="">Event Name</label>
{{input value=event.name}}
<label for="">City</label>
{{input value=event.city}}
<label for="">State</label>
{{input value=event.state}}
</div>
<button type="submit">Add Event</button>
</form>
js文件:
import Ember from 'ember';
export default Ember.Component.extend ({
actions:
{
addEvent: function() {
this.sendAction('action', this.event);
}
}
});
兩者都在../templates/components目錄中。
知道我在做什么錯嗎? 該組件是保留名稱還是其他名稱? 我迷路了!
js文件必須放置在“ ../components”目錄中。
模板將被轉換為'template'目錄中的js文件,但您的情況下已經存在一個js文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.