我的节点应用程序在我的 macbook 上运行良好,但是当我在 Rackspace 上发布到我们的服务器时,我收到以下我从未见过的错误(敏感路径替换为 [...]):
[...]/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)