Skip to content

Cannot read property 'MysqlConnection' of null #162

Closed
feelinc opened this Issue Sep 27, 2012 · 7 comments

5 participants

@feelinc
feelinc commented Sep 27, 2012

I'm using:

  • Mountain lion
  • Node v0.8.8
  • node-mysql-libmysqlclient v1.5.1

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
Owner
Sannis commented Sep 27, 2012

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

@feelinc
feelinc commented Sep 27, 2012

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
feelinc commented Sep 27, 2012

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
feelinc commented Sep 28, 2012

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.

@feelinc feelinc closed this Sep 28, 2012
@bentomas

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
tgienger commented Feb 9, 2014

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

@whoughton

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

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.