-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'implementation' of undefined #436
Comments
Seeing same problem as I run the main sample:
TypeError: Cannot read property 'implementation' of undefined |
Reported also at: http://stackoverflow.com/questions/10143288/node-js-jsdom-error |
I am experiencing the same problem on mac osx |
weird, I can't seem to dupe with the code from SO. |
I´ve gotten this failure on cloud9ide.com ´s online test. Don´t know the node version running there |
I too am running into this issue, on node v0.6.15. |
what version of jsdom are you guys running? |
Mine is showing latest - 0.2.14. |
Same, 0.2.14, installed via npm. Here's a test script which yields the error: https://github.com/philip-peterson/propellant/blob/c5bac2cc21fe3c38090d001bba09c78037378fe7/test.js |
Same bug, both with node 0.6.15, 0.7.8 and jsdom 0.2.14. |
It looks like this has something to do with the Contextify workaround. I can reproduce this without Contextify, but not with it. Contextify should build on Windows now, so try installing that. |
Having the same with this test case: var fs = require('fs'),
jsdom = require('jsdom'),
xpath = require('./node_modules/jsdom/lib/jsdom/level3/xpath.js'),
XPathResult = xpath.XPathResult,
XPathEvaluator = new xpath.XPathEvaluator();
for (var x = 1; x <= 4; x++) {
jsdom.env({
html : 'http://sapphiretrans.free.fr/Pokedex/?act=' + x + '&page=0&mode=Crystal',
done: function (err, window) {
if (err) {
console.log('Error caught at', err);
} else {
var context = window.document,
xpathStr = '/html/body/div[1]/div[2]/table[1]/tr/td[2]/table/tr[2]/td',
result = XPathEvaluator.evaluate(xpathStr, context, context, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
console.log('Results count: ', result.snapshotLength);
console.log('Result textContent', result.snapshotItem(0).textContent);
}
},
features: {
FetchExternalResources : [],
ProcessExternalResources : false,
MutationEvents : false,
QuerySelector : false
},
});
} It should be noted that i do NOT have Contextify on this computer, since I'm not gonna install Python for this sole app. |
After digging around the issue is in fact related to Contextify. contextify is having a problem because it tries to build bindings using the 'node-bindings' tool, which then uses 'node-gyp' which doesn't support Python 2.4, it seems. What version of Python do you all have installed? |
I've got "Python 2.7.2+" |
2.7.2, Windows distribution. |
Just installed Python 2.3.5. Its currently compiling Contextify, ill keep you in touch and edit when the process either fails or successes. |
Console output:
I'm on window 7 32 bits. |
Any quick fixes? What version of node / jsdom should I install to get it running? OSX 10.6.8 npm view jsdom python --version
|
This actually is a contextify issue. I'm trying to install it with various versions of Python, ranging from 2.3.5 to 2.7.2 |
I am also having trouble with this: Thanks! |
Any news on this. I am just starting with node.js and jsdom today and this is a nice 'howdoyado'. :-) |
I just installed node 0.6.16 today and used npm to install everything else. npm ls gives me ├─┬ http-agent@0.1.2 |
Hey everyone, I just ran into this error today and solved it. All I did was install Python 2.7.3 (recommended by Contextify) and added my environment variables (PYTHONPATH, and added C:\Python27 to the end of my PATH variable). I then reinstalled After that I ran the README test again and it worked! |
awesome! thank you for looking into this @kamranayub! |
Confirmed, working fix. Thanks a lot :) |
Doesn´t work for me. :( I can´t install Python on www.cloud9ide.com ... :( |
This just doesn't make any sense. I just started with Nodejs a couple of days ago and am trying to work my way trying to build something. I required jsdom and it doesn't work at all due to contextify. Its a little early to start with something and end up fixing build errors :) |
Follow @kamranayub 's tip. |
That didn't seem to work work for me, but this helped. |
Just wanted to mention that you could look at Cheerio if you didn't need all the fanciness of jsdom: http://encosia.com/cheerio-faster-windows-friendly-alternative-jsdom |
Thanks! Cheerio looks good. I was in a bit of a hurry for setting up a prototype, so has to move to the express+jade combo. I will give Cheerio a shot now :) |
So there is no way to use jsdom without contextify at the moment? That's a pity, but thanks for the pointer to cheerio! |
Ran into the same issue. |
I have this issue as well. I think I've tried all of the above to some extent, although I might have missed one. Here are my stats: Ubuntu 12.04 Any other suggestions? |
Same issue on Windows 7 (64 bits) with Node v0.8.4. |
I didn't have this issue until after I updated Node from v0.8.2 (I think) to v0.8.9 on my Win7 computer. Python 2.7.3 I'm attempting to roll back my version of node to see if I can get it to work again without switching over to Domino/Zepto. |
Thanks @drbenton for the suggestion. Had to rely on Domino and Zepto Node to work around this for now. |
This is a dupe of #456, and more evidence toward Contextify not being optional. |
On MacOS 10.8. Installed fresh Xcode and brew, python. Contextify fails to build. |
im sorry but this api is broke and this is the first api you find when you search for node.js jquery. as drbrenton pointed out domino + zeptune will get it done. |
Yes, you need to be able to install native modules. If you're using Windows, that means Python + Visual Studio 2010 Express + a 32-bit version of Node. I know it sucks, but that's how Node.js works. |
how to solve this problem? |
@niued install the very latest jsdom version, with Contextify. |
Don't know if this helps - but we were able to solve this by using contextify |
fwiw, I have this problem on ubuntu |
@nickgeorge, what version of jsdom/node/npm, and do you get any errors when installing jsdom? What does |
After having things work fine for a number of months with jsdom 0.4.1 and node 0.8.(approx 16?), I started receiving this error today, also. I had just upgraded to node 0.10.3 (latest). Issuing "npm update" has fixed things. Now running (on Ubuntu 10.04):
HTH |
I'm having this problem too. @gordonwritescode how did you override the version of contextify inside jsdom to 0.1.3? Versions of things I have are:
|
Aha! I've found a workaround for me. Which is to install version 0.5.4 of jsdom, after having already installed contextify 0.1.3 gobally. Like this:
It seems that 0.5.4 of jsdom was the one that changed from contextify@0.1.x to contextify@0.1.5 |
I too find a workaround for this. I rebuild my npm-shrinkwrap with contextify in first in my package.json dependencies.
So deleting my node-modules directory and my npm-shrinkwrap.json and then
and
|
Even though it's 2 years later, thanks @kamranayub for your comments. I don't have root access on the box I'm running this on and so I couldn't upgrade the version of python. The HTML I was parsing was static so Cheerio was a perfect fit for me. You've saved me tons of dev time! |
The text was updated successfully, but these errors were encountered: