2012-04-28 54 views
1

我節點應用工作正常,在我的MacBook,但是當我發佈到我們的服務器上Rackspace公司我碰到下面的錯誤,我以前從來沒見過(替換爲敏感的路徑[...]):jsdom和Contextify錯誤

[...]/node_modules/jsdom/node_modules/contextify/lib/contextify.js:7 
    var ctx = new ContextifyContext(sandbox); 
      ^
TypeError: undefined is not a function 
    at Contextify ([...]/node_modules/jsdom/node_modules/contextify/lib/contextify.js:7:15) 
    at Object.createWindow ([...]/node_modules/jsdom/lib/jsdom/browser/index.js:303:3) 
    at Object.windowAugmentation ([...]/node_modules/jsdom/lib/jsdom/browser/index.js:63:24) 
    at Object.parentWindow ([...]/node_modules/jsdom/lib/jsdom/browser/index.js:605:28) 
    at Object.<anonymous> ([...]/node_modules/jsdom/lib/jsdom.js:81:15) 
    at [...]/node_modules/jsdom/lib/jsdom.js:170:52 
    at Request._callback ([...]/node_modules/jsdom/lib/jsdom.js:275:9) 
    at Request.callback ([...]/node_modules/request/node_modules/request/main.js:119:22) 
    at Request.<anonymous> ([...]/node_modules/request/node_modules/request/main.js:525:16) 
    at Request.emit (events.js:67:17) 

回答

0

Contextify需要編譯創建.node二進制文件。這些都與預建jsdom。它工作得很好我的Mac上,而不是我被髮布到Ubuntu的服務器上。根據固定的問題對我來說是GitHub的頁面上的說明在服務器上重建contextify。