2017-08-04 39 views
0

因此,這裏是詳細信息。我在Mac上運行代碼。該代碼最初是在ubuntu上構建的。直到日期爲止,這不是一個問題。添加具有ajax請求的路由時發生的Ember生成錯誤

錯誤 -

ENOENT: no such file or directory, lstat '/Users/...emberapp/tmp/funnel-input_base_path-nz4m8qQr.tmp/index.html'

再下面,這...

Error: ENOENT: no such file or directory, lstat '/Users/flyn/Documents/working local/backend dashboard/tmp/funnel-input_base_path-xjJozhFY.tmp/index.html' at Error (native)

這是造成問題的途徑。 Ajax調用獨立工作運行這個時候叫上瀏覽器的時候:

http://localhost:4300/getRecords?by_param=by_usage&include_docs=true&key_type=%20

這是路線的代碼。

import Ember from 'ember'; 

export default Ember.Route.extend({  
    ajax: Ember.inject.service(), model(){  return 
    this.get("ajax").request("http://localhost:4300/getRecords", { 
       data: { 
        "by_param": "by_usage", 
        "key_type": "", 
        "include_docs": true, 
        "key_value": {} 
       } 
      }).then(function(usr) { 
       // return usr.rows.data; 
       var ar = [] 
       for (var i=0; i<usr.rows.length; i++){ 
        ar.push(usr.rows[i].doc.data); 
       } 
       return ar 
     }); 
    } 
}); 

現在這就是我所做的。我完全刪除了ajax調用,看看它在那之後是否有效。它沒有。然後我做了(在路由名稱非常相似的命名約定,用連字符 - )...

ember -d route route-name

現在它的工作原理。再次建立了路線,添加了ajax。它繼續工作。關閉服務器並重新啓動,它停止工作。

最後,附加說明。 我看到this link

類似的錯誤,但我已經有看守員,這是以前沒有的問題,第一個答案(不評論)提出了一些想法,這我不知道是什麼意思。 謝謝

回答

0

我添加了一個類似的問題,你有沒有試過clear the watchman-list?它幫助我(重啓計算機或重新啓動崇高文本之後)一切正常,但有時問題仍然存在。

+0

(for root in $(watchman watch-list | jq -r'.roots |。[]'); do watchman watch-del「$ root」; done) Ran/on/bin/sh 它給了錯誤 解析錯誤:第1行第7列中的數字文字無效 –

+0

https://gist.github.com/jerel/f4d8771de0147f4ead5e 嘗試過。也沒有幫助 –

相關問題