Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


invalid ELF header #35

jwerre opened this Issue · 7 comments

3 participants


Working perfectly on my local machine but when I deploy to server I get this error:

Error: /app/node_modules/emailjs/node_modules/buffertools/build/Release/buffertools.node: invalid ELF header

Is this a bug or something I'm doing?


sounds like a possible compile error with buffertools. buffertools is a node extension and partly written in C, so it is possible for it to compile on your local machine but then hit errors when deploying.

also, i've had a few people who were able to fix their problems with buffertools just by updating to the latest node.


node 0.8 was released today. have you tried upgrading to see if that helped you compile buffer tools? (node now comes with gyp instead of waf for compiling C extensions...)


i've updated emailjs to use nodejs native implementation of Buffer.concat on the latest nodejs stable releast (0.8.1)

give that a try, it is likely that will solve any of the errors you may have been having.

@eleith eleith closed this

Same issue. Here are the details if you think that would help:

    npm install emailjs
    npm http GET
    npm http 200
    npm http GET
    npm http 200
    npm http GET
    npm http 200

    buffertools@1.1.0 preinstall /MYAPP/node_modules/emailjs/node_modules/buffertools
    node-waf clean || (exit 0); node-waf configure build

    Nothing to clean (project not configured)
    Setting srcdir to                        : /MYAPP/node_modules/emailjs/node_modules/buffertools 
    Setting blddir to                        : /MYAPP/node_modules/emailjs/node_modules/buffertools/build 
    Checking for program g++ or c++          : /usr/bin/g++ 
    Checking for program cpp                 : /usr/bin/cpp 
    Checking for program ar                  : /usr/bin/ar 
    Checking for program ranlib              : /usr/bin/ranlib 
    Checking for g++                         : ok  
    Checking for node path                   : not found 
    Checking for node prefix                 : ok /usr/local/Cellar/node/0.8.1 
    'configure' finished successfully (0.430s)
    Waf: Entering directory /MYAPP/node_modules/emailjs/node_modules/buffertools/build'
    [1/2] cxx: -> build/Release/buffertools_1.o
    [2/2] cxx_link: build/Release/buffertools_1.o -> build/Release/buffertools.node
    Waf: Leaving directory /MYAPP/node_modules/emailjs/node_modules/buffertools/build
    'build' finished successfully (2.482s)
    emailjs@0.2.9 ./node_modules/emailjs 
    └── buffertools@1.1.0

and I get this error running node v-0.8.1


      process.dlopen(filename, module.exports);


    Error: /app/node_modules/emailjs/node_modules/buffertools/build/Release/buffertools.node: invalid ELF header
        at Object.Module._extensions..node (module.js:480:11)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:362:17)
        at require (module.js:378:17)
        at Object.<anonymous> (/app/node_modules/emailjs/node_modules/buffertools/buffertools.js:1:77)
        at Module._compile (module.js:449:26)
        at Object.Module._extensions..js (module.js:467:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)

when did you run "npm install emailjs"?

try again, because the latest version (0.3.0) no longer requires buffertools. i used buffer tools in the past to provide for a function that is now included in node 0.8.0 natively.


npm install emailjs@0.3.0 works!! Thanks eleith


I am getting the same "invalid ELF header" error when using which depends on and when deploying on Heroku, but works fine locally on my mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.