profile
viewpoint

Ask questionsProblem install sqlite3 when create strapi app (..\src\database.cc(35): error C2248: 'Napi::Env::DefaultFini': cannot access private member declared in class 'Napi::Env' )

<!-- I have a problem when try to install sqlite 3 when create strapi app Here is the log -->

error D:\my-project2\node_modules\sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: D:\my-project2\node_modules\sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@12.20.1 | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "D:\my-project2\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-win32-x64.tar.gz  
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-win32-x64.tar.gz  
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.1 and node@12.20.1 (node-v72 ABI, unknown) (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/v5.0.1/napi-v6-win32-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.20.1 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.20.1 | win32 | x64
gyp info spawn C:Python27\python.exe
gyp info spawn args [
gyp info spawn args   'D:\\my-project2\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\my-project2\\node_modules\\sqlite3\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\my-project2\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\HP\\.node-gyp\\12.20.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\HP\\.node-gyp\\12.20.1',
gyp info spawn args   '-Dnode_gyp_dir=D:\\my-project2\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\HP\\.node-gyp\\12.20.1\\<(target_arch)\\node.lib',       
gyp info spawn args   '-Dmodule_root_dir=D:\\my-project2\\node_modules\\sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\my-project2\\node_modules\\sqlite3\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.20.1 | win32 | x64
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  nothing.c
  win_delay_load_hook.cc
  nothing.vcxproj -> D:\my-project2\node_modules\sqlite3\build\Release\\nothing.lib
  unpack_sqlite_dep
  sqlite3.c
  win_delay_load_hook.cc
  sqlite3.vcxproj -> D:\my-project2\node_modules\sqlite3\build\Release\\sqlite3.lib
  backup.cc
  database.cc
  node_sqlite3.cc
  statement.cc
..\src\database.cc(35): error C2248: 'Napi::Env::DefaultFini': cannot access private member declared in class 'Napi::Env' [D:\my-project2\node_modules\sqlite3\build\node_sqlite3.vcxproj]
  d:\my-project2\node_modules\node-addon-api\napi-inl.h(475): note: see declaration of 'Napi::Env::DefaultFini'
  D:\my-project2\node_modules\node-addon-api\napi.h(168): note: see declaration of 'Napi::Env'
  win_delay_load_hook.cc
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 (D:\my-project2\node_modules\node-gyp\lib\build.js:262:23)       
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\my-project2\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=D:\\my-project2\\node_modules\\sqlite3\\lib\\binding\\napi-v6-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\\my-project2\\node_modules\\sqlite3\\lib\\binding\\napi-v6-win32-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd D:\my-project2\node_modules\sqlite3
gyp ERR! node -v v12.20.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe D:\my-project2\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\my-project2\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\my-project2\node_modules\sqlite3\lib\binding\napi-v6-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\my-project2\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1022:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)       
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\my-project2\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\my-project2\node_modules\sqlite3
node-pre-gyp ERR! node -v v12.20.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe D:\my-project2\node_modules\node-gyp\bin\node-gyp.js bu

</details>

<!-- Any further details -->

nodejs/node-gyp

Answer questions cclauss

gyp info using node-gyp@3.8.0

Current release is v7.1.2

useful!
source:https://uonfu.com/
answerer
Christian Clauss cclauss Christian Clauss Switzerland https://www.patreon.com/cclauss Working hard to find and fix bugs in software and to ensure that Python code is properly ported to Python 3. Building related tools and automated systems.
Github User Rank List