same issue when trying to install as root in docker container with:
node -v: 9.0.0
npm -v: 5.5.1
docker: 17.10.0-ce
# npm install -g sqlite3
> [email protected] install /usr/local/lib/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/9.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp/9.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp/9.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp/9.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
gyp WARN EACCES us
Adding --unsafe-perm leads to
# npm install -g sqlite3 --unsafe-perm
> [email protected] install /usr/local/lib/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/usr/local/lib/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
In file included from ../node_modules/nan/nan.h:192:0,
from ../src/database.h:10,
from ../src/database.cc:4:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:112:73: warning: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)' is deprecated (declared at /root/.node-gyp/9.0.0/include/node/v8.h:3114): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)':
../src/database.cc:144:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)':
../src/database.cc:230:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)':
../src/database.cc:525:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)':
../src/database.cc:625:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
In file included from ../node_modules/nan/nan.h:192:0,
from ../src/database.h:10,
from ../src/node_sqlite3.cc:8:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:112:73: warning: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)' is deprecated (declared at /root/.node-gyp/9.0.0/include/node/v8.h:3114): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
CXX(target) Release/obj.target/node_sqlite3/src/statement.o
In file included from ../node_modules/nan/nan.h:192:0,
from ../src/database.h:10,
from ../src/statement.cc:7:
../node_modules/nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../node_modules/nan/nan_maybe_43_inl.h:112:73: warning: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)' is deprecated (declared at /root/.node-gyp/9.0.0/include/node/v8.h:3114): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginPrepare(node_sqlite3::Database::Baton*)':
../src/statement.cc:118:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
In file included from ../src/statement.cc:6:0:
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginBind(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:322:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(Bind);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginGet(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:370:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(Get);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginRun(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:438:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(Run);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginAll(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:504:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(All);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginEach(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:601:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(Each);
^
../src/statement.cc: In static member function 'static void node_sqlite3::Statement::Work_BeginReset(node_sqlite3::Statement::Baton*)':
../src/macros.h:125:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:724:5: note: in expansion of macro 'STATEMENT_BEGIN'
STATEMENT_BEGIN(Reset);
^
SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node
COPY Release/node_sqlite3.node
COPY /usr/local/lib/node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/usr/local/lib/node_modules/sqlite3/build'
+ [email protected]
added 114 packages in 51.393s
If you want to build sqlite with docker you need additional dependencies:
# If there are no pre-built sqlite3 versions available we have to build it.
RUN apk --no-cache add --virtual .build-dependencies python gcc g++ make \
&& npm install --strip . \
&& npm cache clean --force \
&& apk del .build-dependencies
Would love to see this issue fixed as well :)
same here
Arch Linux has updated it's Node.js package to 9.2.0, which broke node-sqlite3 for me.
I tried downgrading the package with sudo pacman -U /var/cache/pacman/pkg/nodejs-8.8.1-1-x86_64.pkg.tar.xz, but then I couldn't even get node to run, since it seems to rely on some other library that has also been updated. The error I get is:
node: error while loading shared libraries: libicui18n.so.59: cannot open shared
For the time being some of my projects will have to be developed on Windows (since there I can use Node.js 8.9.1 LTS just fine). I hope you guys get around to fixing it soon though.
@telmotrooper I am also developping under ArchLinux. I am using https://github.com/creationix/nvm (it exists also in AUR). That way I have full controll what nodejs version I am using depending on project.
@k2s I'll give it a try when I get home, thanks!
Just wanted to let you guys now, the method suggested by @k2s works really well and it's quite easy to do.
Just installed nvm with curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash, then nvm install 8.9.1 and nvm install 9.2.0 to get both Node.js versions, and nvm use 8 to use 8.9.1. Then I could run npm install just fine in my project that uses node-sqlite3.
Actually, there is an issue during the module compilation on Node v9.2:
In file included from /Users/michald/.node-gyp/9.2.0/include/node/node.h:63:
/Users/michald/.node-gyp/9.2.0/include/node/v8.h:208:5: error: assigning to 'v8::Context *volatile' from incompatible type 'v8::String *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/michald/.node-gyp/9.2.0/include/node/v8.h:162:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../src/database.cc:133:27: note: in instantiation of function template specialization 'v8::Local<v8::Context>::Local<v8::String>' requested here
info.This()->ForceSet(Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly);
^
Same problem here, any chance to get the solution for build
Still happening to me too...
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.12/node-v59-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
and then the build fails too....
Fixed it by using NVM to switch between node versions... anything prior to 9.0.0 seems to work for me.
Same thing with node 9.4.0 here on osx
Just came acros this issue, no pressure! :+1:
Most helpful comment
same here