Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error C2664 while building on windows 10 #914

Closed
coderpradp opened this issue Nov 29, 2017 · 2 comments
Closed

error C2664 while building on windows 10 #914

coderpradp opened this issue Nov 29, 2017 · 2 comments

Comments

@coderpradp
Copy link

So I have a project which has sqlite3@3.1.8 as dependency. When I ran npm install I got following errors:

λ npm install                                                                                                                                                           
                                                                                                                                                                        
> sqlite3@3.1.8 install E:\Project\Vue.js\my-project\server\node_modules\sqlite3                                                                                       
> node-pre-gyp install --fallback-to-build                                                                                                                              
                                                                                                                                                                        
node-pre-gyp info it worked if it ends with ok                                                                                                                          
node-pre-gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',                                                                                                          
node-pre-gyp verb cli   'E:\\Project\\Vue.js\\my-project\\server\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp',                               
node-pre-gyp verb cli   'install',                                                                                                                                      
node-pre-gyp verb cli   '--fallback-to-build' ]                                                                                                                         
node-pre-gyp info using node-pre-gyp@0.6.31                                                                                                                             
node-pre-gyp info using node@9.2.0 | win32 | x64                                                                                                                        
node-pre-gyp verb command install []                                                                                                                                    
node-pre-gyp info check checked for "E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node_sqlite3.node" (not found)            
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v59-win32-x64.tar.gz                                                              
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v59-win32-x64.tar.gz                                                              
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v59-win32-x64.tar.gz                                          
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@9.2.0 (node-v59 ABI) (falling back to source compile with node-gyp)                           
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v59-win32-x64.tar.gz                              
node-pre-gyp verb command build [ 'rebuild' ]                                                                                                                           
                                                                                                                                                                        
E:\Project\Vue.js\my-project\server\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\nod
e_modules\node-gyp\bin\node-gyp.js" clean )  else (node "" clean )                                                                                                      
                                                                                                                                                                        
E:\Project\Vue.js\my-project\server\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\nod
e_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node
_sqlite3.node --module_name=node_sqlite3 --module_path=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64 --python=C:\Users\Invoke
r\.windows-build-tools\python27\python.exe --msvs_version=2015 )  else (node "" configure --fallback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules
\sqlite3\lib\binding\node-v59-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding
\node-v59-win32-x64 --python=C:\Users\Invoker\.windows-build-tools\python27\python.exe --msvs_version=2015 )                                                            
                                                                                                                                                                        
E:\Project\Vue.js\my-project\server\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\nod
e_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node_sql
ite3.node --module_name=node_sqlite3 --module_path=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64 )  else (node "" build --fal
lback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_p
ath=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64 )                                                                          
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.                                                             
  unpack_sqlite_dep                                                                                                                                                     
  sqlite3.c                                                                                                                                                             
  win_delay_load_hook.cc                                                                                                                                                
  sqlite3.vcxproj -> E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\Release\\sqlite3.lib                                                               
  database.cc                                                                                                                                                           
  node_sqlite3.cc                                                                                                                                                       
  statement.cc                                                                                                                                                          
  win_delay_load_hook.cc                                                                                                                                                
e:\project\vue.js\my-project\server\node_modules\sqlite3\node_modules\nan\nan_maybe_43_inl.h(88): warning C4996: 'v8::Object::ForceSet': was declared deprecated (comp 
iling source file ..\src\statement.cc) [E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\node_sqlite3.vcxproj]                                           
  c:\users\invoker\.node-gyp\9.2.0\include\node\v8.h(3117): note: see declaration of 'v8::Object::ForceSet' (compiling source file ..\src\statement.cc)                 
..\src\statement.cc(103): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)':  
cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\node_sqlite3.vcxproj] 
  ..\src\statement.cc(103): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called                      
e:\project\vue.js\my-project\server\node_modules\sqlite3\node_modules\nan\nan_maybe_43_inl.h(88): warning C4996: 'v8::Object::ForceSet': was declared deprecated (comp 
iling source file ..\src\database.cc)e:\project\vue.js\my-project\server\node_modules\sqlite3\node_modules\nan\nan_maybe_43_inl.h(88): warning C4996: 'v8::Object::For 
ceSet': was declared deprecated (compiling source file ..\src\node_sqlite3.cc) [E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\node_sqlite3.vcxproj]   
                                                                                                                                                                        
  c:\users\invoker\.node-gyp\9.2.0\include\node\v8.h(3117): note: see declaration of 'v8::Object::ForceSet' (compiling source file ..\src\database.cc)c:\users\invoker\ 
  .node-gyp\9.2.0\include\node\v8.h(3117): note: see declaration of 'v8::Object::ForceSet' (compiling source file ..\src\node_sqlite3.cc)                               
                                                                                                                                                                        
..\src\statement.cc(277): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data [E:\Project\Vue.js\my-project\server\node_modules\sqlit 
e3\build\node_sqlite3.vcxproj]                                                                                                                                          
..\src\database.cc(133): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': c 
annot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\node_sqlite3.vcxproj]  
  ..\src\database.cc(133): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called                       
..\src\database.cc(134): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': c 
annot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [E:\Project\Vue.js\my-project\server\node_modules\sqlite3\build\node_sqlite3.vcxproj]  
  ..\src\database.cc(134): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called                       
gyp ERR! build error                                                                                                                                                    
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` 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:258:23)                                          
gyp ERR! stack     at ChildProcess.emit (events.js:159:13)                                                                                                              
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)                                                                            
gyp ERR! System Windows_NT 10.0.15063                                                                                                                                   
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-b
uild" "--module=E:\\Project\\Vue.js\\my-project\\server\\node_modules\\sqlite3\\lib\\binding\\node-v59-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--mo
dule_path=E:\\Project\\Vue.js\\my-project\\server\\node_modules\\sqlite3\\lib\\binding\\node-v59-win32-x64"                                                            
gyp ERR! cwd E:\Project\Vue.js\my-project\server\node_modules\sqlite3                                                                                                  
gyp ERR! node -v v9.2.0                                                                                                                                                 
gyp ERR! node-gyp -v v3.6.2                                                                                                                                             
gyp ERR! not ok                                                                                                                                                         
node-pre-gyp ERR! build error                                                                                                                                           
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\
node-v59-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64' 
(1)                                                                                                                                                                     
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (E:\Project\Vue.js\my-project\server\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29) 
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:159:13)                                                                                                     
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)                                                                                            
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)                                                                    
node-pre-gyp ERR! System Windows_NT 10.0.15063                                                                                                                          
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Project\\Vue.js\\my-project\\server\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-
pre-gyp" "install" "--fallback-to-build"                                                                                                                                
node-pre-gyp ERR! cwd E:\Project\Vue.js\my-project\server\node_modules\sqlite3                                                                                         
node-pre-gyp ERR! node -v v9.2.0                                                                                                                                        
node-pre-gyp ERR! node-pre-gyp -v v0.6.31                                                                                                                               
node-pre-gyp ERR! not ok                                                                                                                                                
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node_sqlite3
.node --module_name=node_sqlite3 --module_path=E:\Project\Vue.js\my-project\server\node_modules\sqlite3\lib\binding\node-v59-win32-x64' (1)                            
npm WARN server@1.0.0 No description                                                                                                                                    
npm WARN server@1.0.0 No repository field.                                                                                                                              
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):                                                                                 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})       
                                                                                                                                                                        
npm ERR! code ELIFECYCLE                                                                                                                                                
npm ERR! errno 1                                                                                                                                                        
npm ERR! sqlite3@3.1.8 install: `node-pre-gyp install --fallback-to-build`                                                                                              
npm ERR! Exit status 1                                                                                                                                                  
npm ERR!                                                                                                                                                                
npm ERR! Failed at the sqlite3@3.1.8 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\Invoker\AppData\Roaming\npm-cache\_logs\2017-11-29T12_05_36_500Z-debug.log                                                                        

Anyone to help or even provide me sqlite3@3.1.8 bin files that I can extract directly into node_modules or node_modules/.bin for windows 10 x64 with node v9.2.0 ?

@coderpradp
Copy link
Author

I managed to install sqlite3@3.1.13 somehow but I don't have solution for the error described in OP for 3.1.8
Anyways I'm closing the issue, if you have same error open a new issue.

@twingall1
Copy link

I had same issue: Solved when installed sqlite3@3.1.13 instead of sqlite3@3.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants