unable to install on windows - 'BigInt': is not a member of 'Napi'
See original GitHub issue- Windows 10 build 1903
- Nodejs v8.14.1
- node-gyp v5.0.3
- python 2.7
Following is the output from powershell:
PS E:\myprojectpath\> npm install odbc --save
> odbc@2.2.0 install E:\myprojectpath\\node_modules\odbc
> node-gyp configure build
E:\myprojectpath\\node_modules\odbc>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
odbc.cpp
odbc_connection.cpp
odbc_statement.cpp
dynodbc.cpp
win_delay_load_hook.cc
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(93): warning C4312: 'type cast': conversion from 'SQLUINTEGER' to 'SQLPOINTER' of greater size [E:\
git\sql-sync\node_modules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): error C2039: 'BigInt': is not a member of 'Napi' [E:\myprojectpath\\node_modules\odbc\build\odb
c.vcxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi-inl.h(15): note: see declaration of 'Napi'
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): error C3083: 'BigInt': the symbol to the left of a '::' must be a type [E:\myprojectpath\\node_
modules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): error C2039: 'New': is not a member of 'Napi' [E:\myprojectpath\\node_modules\odbc\build\odbc.v
cxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi-inl.h(15): note: see declaration of 'Napi'
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): error C2664: 'Napi::Reference<Napi::Object> Napi::Reference<Napi::Object>::New(const T &,uint
32_t)': cannot convert argument 1 from 'Napi::Env' to 'const T &' [E:\myprojectpath\\node_modules\odbc\build\odbc.vcxproj]
with
[
T=Napi::Object
]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): note: Reason: cannot convert from 'Napi::Env' to 'const T'
with
[
T=Napi::Object
]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(355): note: No user-defined-conversion operator available that can perform this conversion, or th
e operator cannot be called
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): error C2039: 'BigInt': is not a member of 'Napi' [E:\myprojectpath\\node_modules\odbc\build\odb
c.vcxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi-inl.h(15): note: see declaration of 'Napi'
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): error C3083: 'BigInt': the symbol to the left of a '::' must be a type [E:\myprojectpath\\node_
modules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): error C2039: 'New': is not a member of 'Napi' [E:\myprojectpath\\node_modules\odbc\build\odbc.v
cxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi-inl.h(15): note: see declaration of 'Napi'
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): error C2664: 'Napi::Reference<Napi::Object> Napi::Reference<Napi::Object>::New(const T &,uint
32_t)': cannot convert argument 1 from 'Napi::Env' to 'const T &' [E:\myprojectpath\\node_modules\odbc\build\odbc.vcxproj]
with
[
T=Napi::Object
]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): note: Reason: cannot convert from 'Napi::Env' to 'const T'
with
[
T=Napi::Object
]
E:\myprojectpath\\node_modules\odbc\src\odbc_connection.cpp(861): note: No user-defined-conversion operator available that can perform this conversion, or th
e operator cannot be called
E:\myprojectpath\\node_modules\odbc\src\odbc.cpp(537): error C2039: 'IsBigInt': is not a member of 'Napi::Value' [E:\myprojectpath\\node_modules\odbc\build\odbc.
vcxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi.h(190): note: see declaration of 'Napi::Value'
E:\myprojectpath\\node_modules\odbc\src\odbc.cpp(541): error C2039: 'BigInt': is not a member of 'Napi' [E:\myprojectpath\\node_modules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi-inl.h(15): note: see declaration of 'Napi'
E:\myprojectpath\\node_modules\odbc\src\odbc.cpp(541): error C2065: 'BigInt': undeclared identifier [E:\myprojectpath\\node_modules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\odbc\src\odbc.cpp(541): error C2672: 'Napi::Value::As': no matching overloaded function found [E:\myprojectpath\\node_modules\odbc
\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\odbc\src\odbc.cpp(541): error C2974: 'Napi::Value::As': invalid template argument for 'T', type expected [E:\myprojectpath\\node_m
odules\odbc\build\odbc.vcxproj]
E:\myprojectpath\\node_modules\node-addon-api\napi.h(265): note: see declaration of 'Napi::Value::As'
gyp ERR! build error
gyp ERR! stack Error: `"` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd E:\myprojectpath\\node_modules\odbc
gyp ERR! node -v v8.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN sql-sync@1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odbc@2.2.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odbc@2.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myuser\AppData\Roaming\npm-cache\_logs\2019-09-05T19_24_44_524Z-debug.log
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Npm install command failing with message "could not find ...
When I run the npm install command, npm starts downloading the dependencies. But then, suddenly, it stops with the error:
Read more >How to solve npm install error “npm ERR! code 1”
If your Node.js version is very recent, try downgrading. The stable version 14.16.1 worked.
Read more >Node.js v19.3.0 Documentation
Authentication is never sent to the destination server. CORS is never checked on the destination server; Cannot load non-network dependencies; Network-based ...
Read more >containerize CI job is failing on develop - cld dependency ...
The cld native module dependency is failing to install Last passing job. ... is not a static data member of 'class Napi::ThreadSafeFunction' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
#ifdef NAPI_EXPERIMENTAL was changed to #if (NAPI_VERSION > 2147483646) in napi.h of module node-addon-api
I think NAPI_VERSION should be set to -1 in defines, right?
UPDATE:
node-odbc@2.0.0-4
worked with Node.JSv8.X.X
, so another workaround would be downgrading to2.0.0-4