Manual Deployment error: js-bson: Failed to load c++ bson extension


#1

Can anyone help in understanding this error and how to resolve for a manual deployment of Meteor app? I am using node -node -v v0.10.40 on CentOS 7

node bundle/main.js
[Error: /public_html/bundle/programs/server/npm/cfs_gridfs/node_modules/mongodb/node_modules/bson/build/Release/bson.node: invalid ELF header]
js-bson: Failed to load c++ bson extension, using pure JS version

Is this related to CFS_GridFS or b-son extension? Some issues I found which did not work to resolve this: https://github.com/mongodb/js-bson/issues/58
http://stackoverflow.com/questions/21656420/failed-to-load-c-bson-extension

Thanks,

MG


#2

Try globally installing the node-gyp module on your server:

npm install -g node-gyp


#3

Found this older issue related to that error: https://github.com/meteor/meteor/issues/1391

Seems it happens when the binary version in the npm package doesn’t match the target OS.

But I’m curious if that error is actually preventing your app from running? It seems that it just falls back to the “pure JS version”, no?


#4

Thanks for the feedback and replies. I globally installed node-gyp on server and then on the stack overflow link found in one of the hidden comments this solution:

public_html/bundle/programs/server/npm/cfs_gridfs/ode_modules/mongodb/node_modules/bson]# make

I ran make in the bson directory and this error disappeared.

@alanning I was not seeing the fully functioning app after deploying and it does look to have still been deployed since it was showing iron router message ‘There is no route for this current URL’ but another helpful tip I read was to check console error messages too. I had to correct a publish issue by moving a users.js file from lib to server.

Hope this helps anyone with this issue for manual deployment on CentOS 7!


#5

Hi Huge,

npm install -g node-gyp

or

meteor npm install -g node-gyp ?


#6
npm install -g node-gyp

(the Meteor built tool isn’t normally installed on a deployment destination server.)