jQuery Node 类型错误 : needs a 'context' argument

标签 jquery node.js

我正在尝试在线部署我的node.js 服务器。在我的机器上一切正常,但是当将服务器移动到线上并运行 Node 时,我收到此错误:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: needs a 'context' argument.
    at Object.getGlobal (/my/path/CloudServer/node_modules/jquery/node_modules/jsdom/lib/jsdom/browser/index.js:26:21)
    at Object.createWindow (/my/path/CloudServer/node_modules/jquery/node_modules/jsdom/lib/jsdom/browser/index.js:308:23)
    at Object.windowAugmentation (/my/path/CloudServer/node_modules/jquery/node_modules/jsdom/lib/jsdom/browser/index.js:63:24)
    at Object.parentWindow (/my/path/CloudServer/node_modules/jquery/node_modules/jsdom/lib/jsdom/browser/index.js:605:28)
    at Object.<anonymous> (/my/path/CloudServer/node_modules/jquery/node_modules/jsdom/lib/jsdom.js:81:15)
    at create (/my/path/CloudServer/node_modules/jquery/node-jquery.js:5:47)
    at /my/path/CloudServer/node_modules/jquery/node-jquery.js:9065:18
    at Object.<anonymous> (/my/path/CloudServer/node_modules/jquery/node-jquery.js:9067:1)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)

现在,我一直在尝试跟踪堆栈跟踪,但我无法弄清楚该错误来自何处。由于堆栈显示 jquery for node 中的大部分问题,所以我猜问题就在那里。有谁知道该怎么办吗?

谢谢

最佳答案

我知道这可能不是一个有效的解决方案,但在我升级到 Node 0.12 后,这个错误就消失了。

关于jQuery Node 类型错误 : needs a 'context' argument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9665354/

相关文章:

node.js - 是否可以在不申请新应用程序的情况下更改重定向?音云API

java - Ambari Admin View 2.7.5.0.0 构建失败

javascript - 粘性页脚直到文档高度大于视口(viewport)

jquery - 我的 jQuery 对话框中没有加载任何内容

Jquery PHP如何检查提交表单后复选框是否已被选中

javascript - 为什么我的 jquery 验证器没有显示任何警报消息?

javascript - 从右到左的图像 slider

node.js - 如何对 MongoDB 集合中字段的不同值求和(利用 mongoose)

javascript - Node handbrakejs 运行代码但不输出

node.js - 找到一种更改 Node 版本的方法