Community site: login faq
throw e
Error: /home/----/Havoc/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: wrong ELF class: 
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/home/----/Havoc/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/home/****/Havoc/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:96)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

All feedback appreciated!

Do I need to update something with npm perhaps? If so can that be done through the command line when my node install is through the webapp?

asked 12 Dec '14, 08:38

Cyril Grey
accept rate: 0%

edited 12 Dec '14, 08:42

This type of error means that you're running a binary which was compiled on a different operating system, and instead of recompiling that binary on your current system, you directly uploaded it. How did you install this node application?

Or, did you recently migrate from one of our CentOS 5 servers to a CentOS 6 server, perhaps?

(12 Dec '14, 09:51) ryans ♦♦

Well, I believe I'm using the node application from the control panel, installed through the webapps. Though I did make an earlier attempt to install node from a source, I believe I used wget, make etc. but I later deleted that once I saw that there was a webapps version. I don't know if I migrated from a CentOS 5 server to a CentOS 6 server, my account is only a couple days old and I didn't try to change anything there.

If by node application you mean havoc.js, it's a simple game engine I am trying to use in order to learn java and node.

(12 Dec '14, 22:37) Cyril Grey

If it is a new account than migration is not the reason. Did you install anything with NPM, if so can you list what? It is possible something in their repository was built on a different platform.

(13 Dec '14, 00:54) johns

I didn't install anything with NPM, though I've installed and deleted a couple versions of django, python and twisted from source files before deciding to switch to node. I'm not sure if I might have changed and if it's possible, a rest of my account might help? I'm hoping to get past this stage of my project, the sooner the better :)

(13 Dec '14, 02:09) Cyril Grey

Rebuilding might fix it. Looking for possible solutions I found this thread which seems to suggest that the problem might be NPM as previously suggested, but the user was unable to locate why, but when they re-installed it was fine. You might also consider manually re-installing the contextify.js module alone, since it is the one failing.

(13 Dec '14, 03:22) johns

I tried deleting and reinstalling the webapp, same error :(

Is there a way to confirm whether I am running the 32 or 64 version of node?

(13 Dec '14, 06:10) Cyril Grey

yes, just run:

file $(which node)

You should see something like "ELF 64-bit LSB executable" if it is 64-bit binary.

(13 Dec '14, 06:54) ryans ♦♦

Hmm, it identifies itself as the 64-bit node: node: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

So the program I am running, is it saying that I have the wrong 32-bit version, or that it wants the 32-bit version? Assuming that it's either of those things ;)

(13 Dec '14, 07:32) Cyril Grey

Seems the problem is with "contextify", not Node directly, which is why John was suggesting re-installing this module. Can you run the same command on the Contextify binding? Also, how did you install this module in the first place?

(13 Dec '14, 08:27) ryans ♦♦

I'm confused, is contextify a node file or part of the javascript I'm trying to run? I am having trouble finding that file.

Also, the guy who runs the program I'm using suggested I upgrade to node 0.10.5, is there a way to do that with web faction's default node webapp?

(14 Dec '14, 03:10) Cyril Grey

From your debug output, it looks like contextify is neither a node file, nor a part of the javascript you're trying to run. It's a module, which is essentially an add-on to Node. Most likely you uploaded it with (as "part of") your javascript application, but it's not actually written in javascript. Since you had it built on a 32-bit system locally, then upload it, it fails when you try to run it on our 64-bit server.

Your error message says that this file is located at ~/Havoc/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node. So, this probably says that it's a 32 bit executable or shared object:

file ~/Havoc/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node

I don't think this has anything to do with the Node version your webapp uses. If you needed to upgrade Node itself, you could compile a new version from source code and drop it in, but I don't suggest that route, because I doubt the problem is with Node at all.

Clearly you have some binary file that's compiled for a 32-bit operating system, which you directly uploaded as part of your application, and which your application depends on. The right fix is just to find and download the 64-bit version of that file.

Going deeper, my best guess at how you got this was by doing something like:

npm install jsdom

which goes and gets the "jsdom" node module, which contains a binary component. That component depends on the platform you run the npm install on. So, if you do that on a 32-bit system, then directly upload the files (as part of your project) to our server, it breaks. If that's what happened, just delete the entire jsdom module from your application on our server and then reinstall that same module again using npm. That would install the 64-bit version.

Hope that helps!

(15 Dec '14, 01:17) ryans ♦♦
showing 5 of 11 show 6 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Dec '14, 08:38

question was seen: 4,286 times

last updated: 15 Dec '14, 01:18