w1nk / node-odbc

unixODBC bindings for node
MIT License
90 stars 101 forks source link

Install fails on node v0.12.0 #79

Closed bmullan91 closed 9 years ago

bmullan91 commented 9 years ago

I have installed unixODBC via brew - all good. However running npm i odbc I get the follow:

$ npm i odbc npm WARN package.json seneca-msaccess-store@0.0.0 No repository field. npm WARN package.json seneca-msaccess-store@0.0.0 No README data \

odbc@0.6.12 preinstall /Users/brianmullan/workspace/seneca-msaccess-store/node_modules/odbc node-gyp configure build

child_process: customFds option is deprecated, use stdio instead. CXX(target) Release/obj.target/odbc_bindings/src/odbc.o In file included from ../src/odbc.cpp:25: ../src/odbc.h:73:27: error: expected class name class ODBC : public node::ObjectWrap { ^ ../src/odbc.h:102:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle New(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:25: ../src/odbc.h:105:49: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle CreateConnection(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:25: ../src/odbc.h:112:53: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle CreateConnectionSync(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:21:37: error: expected class name class ODBCConnection : public node::ObjectWrap { ^ ../src/odbc_connection.h:43:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle New(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:46:72: error: unknown type name 'AccessorInfo' static Handle ConnectedGetter(Local property, const AccessorInfo &info); ^ ../src/odbc_connection.h:47:77: error: unknown type name 'AccessorInfo' static Handle ConnectTimeoutGetter(Local property, const AccessorInfo &info); ^ ../src/odbc_connection.h:48:88: error: unknown type name 'AccessorInfo' static void ConnectTimeoutSetter(Local property, Local value, const AccessorInfo &info); ^ ../src/odbc_connection.h:49:75: error: unknown type name 'AccessorInfo' static Handle LoginTimeoutGetter(Local property, const AccessorInfo &info); ^ ../src/odbc_connection.h:50:86: error: unknown type name 'AccessorInfo' static void LoginTimeoutSetter(Local property, Local value, const AccessorInfo &info); ^ ../src/odbc_connection.h:53:49: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle BeginTransaction(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:57:47: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle EndTransaction(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:61:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle Open(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:65:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle Close(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:69:48: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle CreateStatement(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:73:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle Query(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:77:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle Columns(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:80:39: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle Tables(const Arguments& args); ^~~~~ v8::internal::Arguments /Users/brianmullan/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *\ [Release/obj.target/odbc_bindings/src/odbc.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Darwin 14.1.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /Users/brianmullan/workspace/seneca-msaccess-store/node_modules/odbc gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Darwin 14.1.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "odbc" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! odbc@0.6.12 preinstall: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the odbc@0.6.12 preinstall script 'node-gyp configure build'. npm ERR! This is most likely a problem with the odbc package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get their info via: npm ERR! npm owner ls odbc npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/brianmullan/workspace/seneca-msaccess-store/npm-debug.log

wankdanker commented 9 years ago

Someone had emailed me privately asking about installing node-odbc with iojs. This was my response and I believe it applies here too:

Yeah, a major breaking change for native modules was introduced in node v0.11 and io.js is based on node v0.12. node-odbc has not yet addressed this major breaking change as it requires a major rewrite and I have not had time to handle it. :(

I rely heavily on node-odbc and it is really bugging me that I can't move forward to io.js because of this. Hopefully I'll have time in the near future to tackle this, but I can't make any promises.

There is another module called eos which does ODBC stuff. I have not used it but the author told me that it was compatible with the breaking changes from v0.11. You might want to give that a shot.

bmullan91 commented 9 years ago

I got it working on v0.10.26. Is there a specific version range that it works with? If so, I think It would be useful info to add to the readme.

wankdanker commented 9 years ago

v0.10 is the latest series that I know it will work with. I know it used to work with v0.8, but I don't test with that any more. And you're right. It should be noted in the readme and in package.json.

bzuillsmith commented 9 years ago

Just published version 1.0.0! It resolves this issue. Node v12 and iojs and node-webkit should all be supported! Let us know if you hit any bumps.

wankdanker commented 9 years ago

Thank you for your help with getting v0.12 and others working, @bzuillsmith. Closing this issue.