Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error with recent LTS versions #188

Open
LiveFreeAndRoam opened this issue May 28, 2020 · 2 comments
Open

Compile Error with recent LTS versions #188

LiveFreeAndRoam opened this issue May 28, 2020 · 2 comments

Comments

@LiveFreeAndRoam
Copy link

Compilation fails in different ways, depending on what version of node/npm are used.

Is this project still supported?

Is there an official support matrix for node/npm, local-npm?

NOTE: I am installing locally (ie. without the -g flag), since I do not have root privs on this Linux machine.

Between each test, I ran:

$ npm cache clean --force; rm -fr node_modules package*json

I tried rebuilding with various LTS releases of npm and node:

  1. node v10.16.0 (npm v6.9.0) - fails
  2. node v10.20.1 (npm v6.14.4) - fails
  3. node v8.17.0 (npm v6.13.4) - succeeds
  4. node v6.17.1 (npm 3.10.10) - succeeds

I tried installing:
$ npm install local-npm
$ npm install https://github.com/local-npm/local-npm.git
$ npm install https://github.com/local-npm/local-npm.git#v1.6.0

Detailed Description

The results below are for node v10.16.0 (npm v6.9.0).

Attempt 1 - install default package

$ npm install local-npm

  CXX(target) Release/obj.target/leveldown/src/batch.o
In file included from ../../nan/nan.h:192:0,
                 from ../src/batch.cc:3:
../../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)’:
../../nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
               ^

Attempt 2 - install from master branch

$ npm install https://github.com/local-npm/local-npm.git

  CXX(target) Release/obj.target/leveldown/src/batch.o
In file included from ../../nan/nan_converters.h:67:0,
                 from ../../nan/nan.h:202,
                 from ../src/batch.cc:3:
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:18:69: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated (declared at /home/muggeridge/.cache/node-gyp/12.17.0/include/node/v8.h:2663): ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
       val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext())          \
                                                                     ^
../../nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
 X(Boolean)
 ^
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:37:57: warning: ‘v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const’ is deprecated (declared at /home/muggeridge/.cache/node-gyp/12.17.0/include/node/v8.h:2701): BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
   return val->NAME ## Value(isolate->GetCurrentContext());                     \
                                                         ^
../../nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
 X(bool, Boolean)
 ^
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:203,
                 from ../src/batch.cc:3:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan_implementation_12_inl.h:105:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
                           , obj));
                                ^

Attempt 3 - install from latest tag (v1.6.0)

$ npm install https://github.com/local-npm/local-npm.git#v1.6.0

  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:15: error: ‘class v8::Object’ has no member named ‘ForceSet’

Context

I need a local registry to enable installation of node_modules whilst offline.

Possible Implementation

Your Environment

  • Version used:
    I tested with different LTS versions, as described at the top of this post.

  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):

  • Server type and version:

$ uname -a
Linux myhost 10 4.12.14-95.29-default #1 SMP Thu Aug 1 15:34:33 UTC 2019 (47e48a4) x86_64 x86_64 x86_64 GNU/Linux
  • Operating System and version:
  • Link to your project:
@thiagosanches
Copy link

Got the same issue here!

@thiagosanches
Copy link

thiagosanches commented Aug 13, 2020

Hey @LiveFreeAndRoam, you can try to use the docker version, it worked pretty well!
https://hub.docker.com/r/orlandohohmeier/local-npm/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants