Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

jQuery for node TypeError: needs a 'context' argument

jQuery for node TypeError: needs a 'context' argument

Problem

I'm trying to deploy my node.js server online. On my machine everything works fine, but when moving the server online and running node I get this error:

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. (/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. (/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)

Now, I've been trying to follow the stack trace but I cannot figure out where that error comes from. Since the stack shows for the most part problems in jquery for node then I guess the problem is there. Does anyone know what to do?

Thanks

Problem courtesy of: Masiar

Solution

I know it may not be a efficient solution, but after I upgrade to node 0.12 this error has gone.

Solution courtesy of: Trotyl

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

jQuery for node TypeError: needs a 'context' argument

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×