ethereumjs / ethereumjs-tx

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx
Mozilla Public License 2.0
779 stars 235 forks source link

Update .travis.yml to include nodejs v11 #139

Closed chikeichan closed 5 years ago

chikeichan commented 5 years ago

Description

Referenced this issue

When adding node.js v11 to .travis.yml, the following error happens during npm install

> fibers@2.0.2 install /home/travis/build/ethereumjs/ethereumjs-tx/node_modules/fibers
> node build.js || nodejs build.js
make: Entering directory `/home/travis/build/ethereumjs/ethereumjs-tx/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In static member function ‘static void Fiber::DestroyOrphans()’:
../src/fibers.cc:464:67: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/travis/.node-gyp/11.11.0/include/node/v8.h:2991): Use Isolate version [-Wdeprecated-declarations]
      String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                                   ^
../src/fibers.cc: In static member function ‘static void Fiber::RunFiber(void**)’:
../src/fibers.cc:686:66: error: no matching function for call to ‘v8::Script::Compile(v8::Handle<v8::String>)’
     Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                                                  ^
../src/fibers.cc:686:66: note: candidate is:
In file included from /home/travis/.node-gyp/11.11.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/travis/.node-gyp/11.11.0/include/node/v8.h:1359:51: note: static v8::MaybeLocal<v8::Script> v8::Script::Compile(v8::Local<v8::Context>, v8::Local<v8::String>, v8::ScriptOrigin*)
   static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
                                                   ^
/home/travis/.node-gyp/11.11.0/include/node/v8.h:1359:51: note:   candidate expects 3 arguments, 1 provided
../src/fibers.cc:701:66: error: no matching function for call to ‘uni::TryCatch::StackTrace()’
       uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                                                  ^
../src/fibers.cc:701:66: note: candidate is:
In file included from /home/travis/.node-gyp/11.11.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/travis/.node-gyp/11.11.0/include/node/v8.h:8881:43: note: v8::MaybeLocal<v8::Value> v8::TryCatch::StackTrace(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> StackTrace(
                                           ^
/home/travis/.node-gyp/11.11.0/include/node/v8.h:8881:43: note:   candidate expects 1 argument, 0 provided
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make: Leaving directory `/home/travis/build/ethereumjs/ethereumjs-tx/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/travis/.nvm/versions/node/v11.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.4.0-101-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v11.11.0/bin/node" "/home/travis/.nvm/versions/node/v11.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/travis/build/ethereumjs/ethereumjs-tx/node_modules/fibers
gyp ERR! node -v v11.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: 1: nodejs: not found
npm WARN karma-browserify@5.3.0 requires a peer of watchify@>=3 <4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@2.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fibers@2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2019-03-11T23_47_33_932Z-debug.log
The command "eval npm install  " failed. Retrying, 3 of 3.
alcuadrado commented 5 years ago

I experienced the same problem. I believe it was due to ethereumjs-testing using asyncwait, which in turn depends on fibers.

ethereumjs-testing doesn't use asyncawait anymore, so this problem goes away with updating it. That has been done in #145. I'll create a small PR based on that branch adding node 11 to .travis.yml.