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

Theia does not run with Node.js v10.3.0 #2009

Closed
kittaakos opened this issue Jun 1, 2018 · 9 comments · Fixed by #4750
Closed

Theia does not run with Node.js v10.3.0 #2009

kittaakos opened this issue Jun 1, 2018 · 9 comments · Fixed by #4750
Labels
help wanted issues meant to be picked up, require help

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Jun 1, 2018

Help wanted. See: #3358 (comment)

$ nvm use 10 && node --version && npm --version && yarn --version && python --version && git clone https://github.com/theia-ide/theia.git && cd theia && yarn && cd examples/browser && yarn run start
Now using node v10.3.0 (npm v6.1.0)
v10.3.0
6.1.0
1.5.1
Python 2.7.10
Cloning into 'theia'...
remote: Counting objects: 25608, done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 25608 (delta 41), reused 42 (delta 18), pack-reused 25495
Receiving objects: 100% (25608/25608), 118.12 MiB | 2.32 MiB/s, done.
Resolving deltas: 100% (17318/17318), done.
yarn install v1.5.1
(node:5029) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
warning vscode-base-languageclient@0.0.1-alpha.5: The engine "vscode" appears to be invalid.
[4/5] 🔗  Linking dependencies...
warning " > istanbul-instrumenter-loader@3.0.1" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "workspace-aggregator-b404bb6e-1773-4313-be3f-6c77f10d80b0 > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2" has unmet peer dependency "font-awesome@>=4.3.0".
[5/5] 📃  Building fresh packages...
[1/11] ⠁ fibers:                               ^
[2/11] ⠁ phantomjs-prebuilt: Receiving...
[3/11] ⠁ dtrace-provider: ACTION binding_gyp_ndtp_target_build_ndtp .
[7/11] ⠁ node-pty: CXX(target) Release/obj.target/pty/src/unix/pty.o
error An unexpected error occurred: "/Users/akos.kitta/Desktop/theia/node_modules/fibers: Command failed.
Exit code: 127
Command: sh
Arguments: -c node build.js || nodejs build.js
Directory: /Users/akos.kitta/Desktop/theia/node_modules/fibers
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.3.0 | darwin | x64
gyp http GET https://nodejs.org/download/release/v10.3.0/node-v10.3.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.3.0/node-v10.3.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.3.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.3.0/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/Desktop/theia/node_modules/fibers/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/.node-gyp/10.3.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/akos.kitta/.node-gyp/10.3.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/akos.kitta/Desktop/theia/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/akos.kitta/.node-gyp/10.3.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/akos.kitta/Desktop/theia/node_modules/fibers',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:122:64: error: too few arguments to function call, expected at least 3, have 2
                return String::NewFromOneByte(isolate, (const uint8_t*)string);
                       ~~~~~~~~~~~~~~~~~~~~~~                                ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:2736:3: note: 'NewFromOneByte' declared here
  static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
  ^
../src/fibers.cc:126:64: error: too few arguments to function call, expected at least 3, have 2
                return String::NewFromOneByte(isolate, (const uint8_t*)string);
                       ~~~~~~~~~~~~~~~~~~~~~~                                ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:2736:3: note: 'NewFromOneByte' declared here
  static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
  ^
../src/fibers.cc:406:24: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
                                        String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                          ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:2821:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED(\"Use Isolate version\",
    ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/fibers.cc:433:80: error: no matching member function for call to 'NewInstance'
                                return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:3862:44: note: candidate function not viable: requires single argument 'context', but 2 arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:3859:44: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
../src/fibers.cc:621:14: error: no matching constructor for initialization of 'v8::TryCatch'
                                TryCatch try_catch;
                                         ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:8282:12: note: candidate constructor not viable: requires single argument 'isolate', but no arguments were provided
  explicit TryCatch(Isolate* isolate);
           ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:8402:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  TryCatch(const TryCatch&) = delete;
  ^
../src/fibers.cc:628:13: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
                                Script::Compile(uni::NewLatin1String(that.isolate, \"void 0;\"));
                                        ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:1234:10: note: 'Compile' has been explicitly marked deprecated here
  static V8_DEPRECATED(\"Use maybe version\",
         ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/fibers.cc:741:34: error: no matching member function for call to 'ToNumber'
                        Coroutine::pool_size = value->ToNumber()->Value();
                                               ~~~~~~~^~~~~~~~
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:2366:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                           ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:2383:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                    Local<Number> ToNumber(Isolate* isolate) const);
                                  ^
../src/fibers.cc:793:72: error: too few arguments to function call, expected at least 3, have 2
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, \"current\"), GetCurrent);
                        ~~~~~~~~~~~~~~~                                                     ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:3214:3: note: 'SetAccessor' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
  ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8config.h:410:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/fibers.cc:794:63: error: no viable conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'Local<v8::Name>'
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, \"poolSize\"), GetPoolSize, SetPoolSize);
                                                                                   ^~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'const v8::Local<v8::Name> &' for 1st argument
class Local {
      ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'v8::Local<v8::Name> &&' for 1st argument
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:206:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)'
  V8_INLINE Local(Local<S> that)
            ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:3215:43: note: passing argument to parameter 'name' here
      Local<Context> context, Local<Name> name,
                                          ^
../src/fibers.cc:795:84: error: too few arguments to function call, expected at least 3, have 2
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, \"fibersCreated\"), GetFibersCreated);
                        ~~~~~~~~~~~~~~~                                                                 ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:3214:3: note: 'SetAccessor' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
  ^
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8config.h:410:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/fibers.cc:1:
In file included from ../src/coroutine.h:1:
In file included from /Users/akos.kitta/.node-gyp/10.3.0/include/node/node.h:63:
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:213:5: error: assigning to 'v8::Context *' from incompatible type 'v8::String *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.3.0/include/node/v8.h:167:39: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\
                                      ^~~~~~~~~~~~~~~~~~
../src/fibers.cc:794:20: note: in instantiation of function template specialization 'v8::Local<v8::Context>::Local<v8::String>' requested here
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, \"poolSize\"), GetPoolSize, SetPoolSize);
                                        ^
2 warnings and 9 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command \"/Users/akos.kitta/.nvm/versions/node/v10.3.0/bin/node\" \"/Users/akos.kitta/Desktop/theia/node_modules/.bin/node-gyp\" \"rebuild\" \"--release\"
gyp ERR! cwd /Users/akos.kitta/Desktop/theia/node_modules/fibers
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
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`
@kittaakos
Copy link
Contributor Author

Axosoft/nsfw#52

@adamretter
Copy link
Contributor

I can confirm this on Windows. The problem is the nsfw module. To fix the build I ran:

choco uninstall yarn
choco uninstall nodejs.install
choco install nodejs.install --version 8.11.4 -y
choco install yarn --version 1.7.0 -y

adamretter added a commit to adamretter/theia that referenced this issue Aug 18, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009
adamretter added a commit to adamretter/theia that referenced this issue Aug 18, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009
adamretter added a commit to adamretter/theia that referenced this issue Aug 31, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009
adamretter added a commit to adamretter/theia that referenced this issue Aug 31, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009
@kittaakos
Copy link
Contributor Author

This seems to be fixed in version 1.1.0. I have verified it with nsfw@1.1.1, and out upstream dependency, vscode-nsfw, already has this change in 1.1.1.

rm -rf nsfw-node-10 \
&& mkdir nsfw-node-10 \
&& cd nsfw-node-10 \
&& nvm install 10 \
&& nvm use 10 \
&& node --version \
&& npm init -y \
&& npm i -S nsfw@1.1.1
prprpr:Desktop akos.kitta$ rm -rf nsfw-node-10 \
> && mkdir nsfw-node-10 \
> && cd nsfw-node-10 \
> && nvm install 10 \
> && nvm use 10 \
> && node --version \
> && npm init -y \
> && npm i -S nsfw@1.1.1
Downloading https://nodejs.org/dist/v10.13.0/node-v10.13.0-darwin-x64.tar.xz...
######################################################################## 100.0%
Now using node v10.13.0 (npm v6.4.1)
Now using node v10.13.0 (npm v6.4.1)
v10.13.0
Wrote to /Users/akos.kitta/Desktop/nsfw-node-10/package.json:

{
  "name": "nsfw-node-10",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}



> nsfw@1.1.1 install /Users/akos.kitta/Desktop/nsfw-node-10/node_modules/nsfw
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/nsfw/src/NSFW.o
In file included from ../src/NSFW.cpp:1:
In file included from ../src/../includes/NSFW.h:5:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:340:28: warning: 'New' is deprecated [-Wdeprecated-declarations]
  return v8::StringObject::New(value).As<v8::StringObject>();
                           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:5052:3: note: 'New' has been explicitly marked deprecated here
  V8_DEPRECATED("Use Isolate* version",
  ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
In file included from ../src/NSFW.cpp:1:
In file included from ../src/../includes/NSFW.h:5:
../../nan/nan.h:1066:44: warning: 'ToString' is deprecated [-Wdeprecated-declarations]
      v8::Local<v8::String> string = from->ToString();
                                           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2454:10: note: 'ToString' has been explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
         ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
In file included from ../src/NSFW.cpp:1:
In file included from ../src/../includes/NSFW.h:5:
../../nan/nan.h:1080:27: warning: 'WriteUtf8' is deprecated [-Wdeprecated-declarations]
        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                          ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2658:3: note: 'WriteUtf8' has been explicitly marked deprecated here
  V8_DEPRECATED("Use Isolate* version",
  ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/NSFW.cpp:56:32: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  baton->nsfw->mErrorCallback->Call(1, argv);
                               ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:98:32: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  baton->nsfw->mEventCallback->Call(1, argv);
                               ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:180:34: warning: 'Uint32Value' is deprecated [-Wdeprecated-declarations]
  uint32_t debounceMS = info[0]->Uint32Value();
                                 ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2477:3: note: 'Uint32Value' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
  ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/NSFW.cpp:181:44: warning: 'ToString' is deprecated [-Wdeprecated-declarations]
  v8::String::Utf8Value utf8Value(info[1]->ToString());
                                           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2454:10: note: 'ToString' has been explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
         ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/NSFW.cpp:181:25: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  v8::String::Utf8Value utf8Value(info[1]->ToString());
                        ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2891:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/NSFW.cpp:212:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(1, argv);
              ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:258:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(1, argv);
              ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:260:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(0, NULL);
              ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:285:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(1, argv);
              ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/NSFW.cpp:327:13: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  callback->Call(0, NULL);
            ^
../../nan/nan.h:1654:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
13 warnings generated.
  CXX(target) Release/obj.target/nsfw/src/Queue.o
  CXX(target) Release/obj.target/nsfw/src/NativeInterface.o
  CXX(target) Release/obj.target/nsfw/src/osx/RunLoop.o
  CXX(target) Release/obj.target/nsfw/src/osx/FSEventsService.o
  SOLINK_MODULE(target) Release/nsfw.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN nsfw-node-10@1.0.0 No description
npm WARN nsfw-node-10@1.0.0 No repository field.

+ nsfw@1.1.1
added 8 packages from 17 contributors and audited 9 packages in 9.867s
found 0 vulnerabilities

prprpr:nsfw-node-10 akos.kitta$ 

I will verify it within Theia.

@kittaakos
Copy link
Contributor Author

No, it is failing because of fiber. I try to bump up the version. wdio-mocha-framework uses fiber.

Details:

prprpr:theia akos.kitta$ nvm use 10 && node --version && yarn --force
Now using node v10.13.0 (npm v6.4.1)
v10.13.0
yarn install v1.12.1
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
warning monaco-languageclient@0.9.0: The engine "vscode" appears to be invalid.
warning vscode-base-languageclient@4.4.0: The engine "vscode" appears to be invalid.
[4/5] 🔗  Linking dependencies...
warning " > istanbul-instrumenter-loader@3.0.1" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > tslint-language-service@0.9.9" has incorrect peer dependency "typescript@>= 2.3.1 < 3".
warning "workspace-aggregator-3aca36e3-bc66-4e74-b191-0a9f09c2d508 > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2" has unmet peer dependency "font-awesome@>=4.3.0".
[5/5] 📃  Rebuilding all packages...
[1/13] ⡀ fibers
[2/13] ⡀ dtrace-provider
[6/13] ⡀ node-pty
[4/13] ⡀ electron
error /Users/akos.kitta/Desktop/theia/node_modules/fibers: Command failed.
Exit code: 127
Command: node build.js || nodejs build.js
Arguments:
Directory: /Users/akos.kitta/Desktop/theia/node_modules/fibers
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.13.0 | darwin | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/Desktop/theia/node_modules/fibers/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/akos.kitta/.node-gyp/10.13.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/akos.kitta/.node-gyp/10.13.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/akos.kitta/Desktop/theia/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/akos.kitta/.node-gyp/10.13.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/akos.kitta/Desktop/theia/node_modules/fibers',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:122:64: error: too few arguments to function call, expected atleast 3, have 2
                return String::NewFromOneByte(isolate, (const uint8_t*)string);
                       ~~~~~~~~~~~~~~~~~~~~~~                                ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2802:3: note: 'NewFromOneByte' declared here
  static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
  ^
../src/fibers.cc:126:64: error: too few arguments to function call, expected atleast 3, have 2
                return String::NewFromOneByte(isolate, (const uint8_t*)string);
                       ~~~~~~~~~~~~~~~~~~~~~~                                ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2802:3: note: 'NewFromOneByte' declared here
  static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
  ^
../src/fibers.cc:406:24: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
                                        String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                          ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2891:5: note: 'Utf8Value'has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/fibers.cc:433:80: error: no matching member function for call to 'NewInstance'
                                return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:3996:44: note: candidate function not viable: requires single argument 'context', but 2 arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:3993:44: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
../src/fibers.cc:621:14: error: no matching constructor for initialization of 'v8::TryCatch'
                                TryCatch try_catch;
                                         ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:8536:12: note: candidate constructor not viable: requires single argument 'isolate', but no arguments were provided
  explicit TryCatch(Isolate* isolate);
           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:8656:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  TryCatch(const TryCatch&) = delete;
  ^
../src/fibers.cc:628:13: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
                                Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                        ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:1255:10: note: 'Compile' has been explicitly marked deprecated here
  static V8_DEPRECATED("Use maybe version",
         ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/fibers.cc:741:34: error: no matching member function for call to 'ToNumber'
                        Coroutine::pool_size = value->ToNumber()->Value();
                                               ~~~~~~~^~~~~~~~
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2425:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                           ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:2442:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<Number> ToNumber(Isolate* isolate) const);
                              ^
../src/fibers.cc:793:72: error: too few arguments to function call, expected atleast 3, have 2
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
                        ~~~~~~~~~~~~~~~            ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:3348:3: note: 'SetAccessor' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
  ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:416:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/fibers.cc:794:63: error: no viable conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'Local<v8::Name>'
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
   ^~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:204:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'const v8::Local<v8::Name> &' for 1st argument
class Local {
      ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:204:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uni::FunctionType (Local<v8::String>, const uni::GetterCallbackInfo &)' (aka 'void (Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'v8::Local<v8::Name> &&' for 1st argument
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:208:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)'
  V8_INLINE Local(Local<S> that)
            ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:3349:43: note: passing argument to parameter 'name' here
      Local<Context> context, Local<Name> name,
                                          ^
../src/fibers.cc:795:84: error: too few arguments to function call, expected atleast 3, have 2
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                        ~~~~~~~~~~~~~~~                        ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:3348:3: note: 'SetAccessor' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
  ^
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8config.h:416:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/fibers.cc:1:
In file included from ../src/coroutine.h:1:
In file included from /Users/akos.kitta/.node-gyp/10.13.0/include/node/node.h:63:
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:215:5: error: assigning to 'v8::Context *' from incompatible type 'v8::String *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/akos.kitta/.node-gyp/10.13.0/include/node/v8.h:169:39: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                      ^~~~~~~~~~~~~~~~~~
../src/fibers.cc:794:20: note: in instantiation of function template specialization 'v8::Local<v8::Context>::Local<v8::String>' requested here
                        fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                        ^
2 warnings and 9 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/akos.kitta/Desktop/theia/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/Users/akos.kitta/.nvm/versions/node/v10.13.0/bin/node" "/Users/akos.kitta/Desktop/theia/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/akos.kitta/Desktop/theia/node_modules/fibers
gyp ERR! node -v v10.13.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`



prprpr:theia akos.kitta$ yarn why fibers
yarn why v1.12.1
[1/4] 🤔  Why do we have the module "fibers"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "fibers@1.0.15"
info Reasons this module exists
   - "_project_#wdio-mocha-framework#wdio-sync" depends on it
   - Hoisted from "_project_#wdio-mocha-framework#wdio-sync#fibers"
info Disk size without dependencies: "1.5MB"
info Disk size with unique dependencies: "1.5MB"
info Disk size with transitive dependencies: "1.5MB"
info Number of shared dependencies: 0
✨  Done in 2.11s.
prprpr:theia akos.kitta$

@kittaakos
Copy link
Contributor Author

It seems the wdio versions are pinned on purpose.

Does it ring the bell, @AlexTugarev?

kittaakos pushed a commit that referenced this issue Oct 31, 2018
 - The blocker was in `vscode-nsfw` due to `nsfw`. `1.1.1` had the fix.
 - Bumped up the transitive `fiber` dependency (via `wdio`) as well.

Closes: #2009
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Oct 31, 2018
This should not get to `master` for GH-2009.
adamretter added a commit to adamretter/theia that referenced this issue Nov 1, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009
adamretter added a commit to adamretter/theia that referenced this issue Nov 1, 2018
… be done from cmd.exe (don't need different shells)

Closes eclipse-theia#1614
See also eclipse-theia#2009

Signed-off-by: Adam Retter <adam.retter@googlemail.com>
@kittaakos kittaakos added the help wanted issues meant to be picked up, require help label Nov 1, 2018
kittaakos pushed a commit that referenced this issue Dec 6, 2018
Closes #2009.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Dec 6, 2018
!!SQUASH ME

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@AlexTugarev
Copy link
Contributor

It seems the wdio versions are pinned on purpose.

not sure, how relevant this is. I've pinned them, as a freshly created yarn.lock pulled some then-latest dependencies which were incompatible. afair it was related to webpack.

@AlexTugarev
Copy link
Contributor

@kittaakos fyi, I've tried this in linux workspace, and I could resolve the build issue by bumping these versions

dependencies:

"vscode-nsfw": "^1.1.2"
"electron-rebuild": "^1.8.2"

dev dependencies:

"wdio-mocha-framework": "^0.6.4",
"wdio-selenium-standalone-service": "^0.0.12",
"wdio-spec-reporter": "^0.1.5",
"webdriverio": "^4.14.1"

not sure about a) other platforms, and b) tests.

@kittaakos
Copy link
Contributor Author

and I could resolve the build issue by bumping these versions

Thanks, I know. Here is the PR for it: #3768.

@vazexqi
Copy link

vazexqi commented Feb 11, 2019

Are there any plans to support this soon?

The latest version of VS Code (1.30.x released in February) says

The version of Electron that VS Code runs on has been updated which brings with it an update to Node.js from 8.9 to 10.2.0. All extensions will now run on this newer version of Node.js. Take a look at Node v10.0.0 deprecations for a list of deprecations in Node.js 10.

It seems that this would have impact on the move toward a plug-in model (vs extensions) for Theia and running VS Code extensions out-of-the-box. If the extensions start using Node.js 10 APIs and Theia can only support Node 8, that might cause some extensions not to run.

As far as I know, there is no shim layer for different versions of Node. So once the extension uses Node 10 API, you can't easily provide a backward version with Node 8.

jankeromnes added a commit to jankeromnes/theia that referenced this issue Mar 13, 2019
Co-authored-by: Alex Tugarev <alex.tugarev@typefox.io>
Co-authored-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Mar 13, 2019
Co-authored-by: Alex Tugarev <alex.tugarev@typefox.io>
Co-authored-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Mar 13, 2019
…yor.

Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Mar 14, 2019
Co-authored-by: Alex Tugarev <alex.tugarev@typefox.io>
Co-authored-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Mar 14, 2019
…yor.

Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
debovema pushed a commit to debovema/theia that referenced this issue Mar 28, 2019
….x.x`.

Closes eclipse-theia#2009.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
debovema pushed a commit to debovema/theia that referenced this issue Mar 28, 2019
….x.x`.

Closes eclipse-theia#2009.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help
Projects
None yet
4 participants