Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodejs electronjs sqlite3 - use of undeclared identifier 'napi_is_detached_arraybuffer'


I am trying to build a cross-platform app using electronjs and sqlite3.
I am getting following napi error. Tried to look around on internet, not much success.
node version = v14.15.5
npm version = 6.14.11
electronjs = [email protected]

In file included from /private/var/folders/fn/w2twbxf91x383fdq967zkl8r0000gn/T/electron-packager/darwin-x64/iBigDo-darwin-x64/Electron.app/Contents/Resources/app/node_modules/sqlite3/node_modules/node-addon-api/napi.h:2636: /private/var/folders/fn/w2twbxf91x383fdq967zkl8r0000gn/T/electron-packager/darwin-x64/myapp-darwin-x64/Electron.app/Contents/Resources/app/node_modules/sqlite3/node_modules/node-addon-api/napi-inl.h:1575:24: error: use of undeclared identifier 'napi_is_detached_arraybuffer'; did you mean 'napi_is_arraybuffer'? napi_status status = napi_is_detached_arraybuffer(_env, _value, &detached); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ napi_is_arraybuffer

Thanks.

like image 268
Rishi Dev Avatar asked Feb 15 '21 05:02

Rishi Dev


1 Answers

I hit the same error, and found that downgrading sqlite3 from 5.0.3 to 5.0.0 resolved it for me.

like image 183
plexer Avatar answered Nov 13 '22 17:11

plexer