0

Building electron angular sqlite application below version installed in project

node v10.20.1
Angular CLI: 11.2.11
typescript 4.1.5 electron v12.0.5 electron-builder ^22.11.1 "electron-rebuild": "^2.3.5", "node-addon-api": "^3.1.0",
"node-gyp": "^8.0.0",
"sqlite3":"github:mapbox/node-sqlite3",

using this command: npm run rebuild

Getting errror below ⠼ Building module: bcrypt, Completed: 0G:\Project\Project\node_modules\node-addon- api\napi.h(4,10): fatal error C1083: Cannot open include file: 'node_api.h': No such file or directory [G:\Project\Project\node_modules\bcrypt\build\bcrypt_lib.vcxproj ] ✖ Rebuild Failed

   An unhandled error occurred inside electron-rebuild
   node-gyp failed to rebuild 'G:\Project\Project\node_modules\bcrypt'.
   Error: `C:\Program Files (x86)\Microsoft Visual 
   Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` 
   failed with exit code: 1



  Error: node-gyp failed to rebuild 'G:\Project\Project\node_modules\bcrypt'.
  Error: `C:\Program Files (x86)\Microsoft Visual 
  Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` 
  failed with exit code: 1


  at ModuleRebuilder.rebuildNodeGypModule (G:\Project\Project\node_modules\electron- 
  rebuild\lib\src\module-rebuilder.js:193:19)
  at process._tickCallback (internal/process/next_tick.js:68:7)
  • Check this if it helps - https://stackoverflow.com/questions/61199335/an-unhandled-error-occurred-inside-electron-rebuild – Tejeshree May 08 '21 at 18:48
  • Hi @Tejeshree thank for sharing, thank you for help, I follow the steps but now I am getting new error like Undefined variable napi_build_version in binding.gyp while trying to load binding.gyp – santosh singh May 09 '21 at 13:19

0 Answers0