Sannis / node-mysql-libmysqlclient

Asynchronous MySQL binding for Node.js
http://sannis.github.com/node-mysql-libmysqlclient
Other
229 stars 47 forks source link

Cannot read property 'MysqlConnection' of null #162

Closed feelinc closed 11 years ago

feelinc commented 11 years ago

I'm using:

log:

MysqlConnectionQueued.prototype = new bindings.MysqlConnection(); ^ TypeError: Cannot read property 'MysqlConnection' of null at Object. (/Users/Me/Sites/app/node_modules/mysql-libmysqlclient/lib/mysql-libmysqlclient.js:208:47) 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) at Module.require (module.js:362:17) at require (module.js:378:17) at Object. (/Users/Me/Sites/app/node_modules/mysql-libmysqlclient/doc/examples.js:14:11) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10)

do you think the error related to missing mysql_bindings?

Sannis commented 11 years ago

Yep. If you just clone a repository, you should run make or npm install to cimpile bindings.

feelinc commented 11 years ago

I'm already ran make or npm install, but no mysql_bindings.node created. I think node-gyp needed to compile it. I'll let you know the result later.

Thanks.

feelinc commented 11 years ago

Yes the node-gyp solve the missing mysql_bindings.node file. But now i'm having another problem:

$ node index.js dyld: lazy symbol binding failed: Symbol not found: __ZN2v814ObjectTemplate11SetAccessorENS_6HandleINS_6StringEEEPFNS1_INS_5ValueEEENS_5LocalIS2_EERKNS_12AccessorInfoEEPFvS7_NS6_IS4_EESA_ES5_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE Referenced from: /Users/Me/Sites/app/node_modules/mysql-libmysqlclient/build/Release/mysql_bindings.node Expected in: dynamic lookup

dyld: Symbol not found: __ZN2v814ObjectTemplate11SetAccessorENS_6HandleINS_6StringEEEPFNS1_INS_5ValueEEENS_5LocalIS2_EERKNS_12AccessorInfoEEPFvS7_NS6_IS4_EESA_ES5_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE Referenced from: /Users/Me/Sites/app/node_modules/mysql-libmysqlclient/build/Release/mysql_bindings.node Expected in: dynamic lookup

Trace/BPT trap: 5

I'll try again tomorrow morning in my working environment, currently i'm experimenting using macbook which is having issue, installed node v0.8.6, while "node -v" showing v.6.12

feelinc commented 11 years ago

Yes everything are working great in my working environment, node v0.8.8. Maybe you should mention to use node-gyp for compiling the mysql_bindings in the doc.

Thanks.

bentomas commented 11 years ago

Just because you got this working in a different environment doesn't mean this issue is solved. I think this should be reopened, I cannot run node-mysql-libmysqlclient on Mountain Lion.

tgienger commented 10 years ago

I'm having this issue in Mavericks as well. I've tried every solution on this page with no luck.

whoughton commented 9 years ago

I'm seeing this issue as well, with no solution found.