Khoa Nguyễn
Khoa Nguyễn

Reputation: 3

Problem install sqlite3 (..\src\database.cc(35): error C2248: 'Napi::Env::DefaultFini': cannot access private member declared in class 'Napi::Env'

I have a problem when trying install sqlite3 when create strap app

im try : yarn install sqlite3 and have try many way but still not work

Here is the log

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

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 [email protected]
node-pre-gyp info using [email protected] | 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 [email protected] and [email protected] (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 [email protected]
gyp info using [email protected] | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | 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 it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | 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

Upvotes: 0

Views: 499

Answers (1)

Naono Kouki
Naono Kouki

Reputation: 36

I had the same problem. In my case, I used npm install sqlite3. sqlite3(5.0.1) has not been released yet, so it may have some bugs. I was able to install it by dropping the version with npm install [email protected]. Hope this is helpful.

Upvotes: 1

Related Questions