everydayhero / boiler-room-builder

A tool-chain for universal react apps
1 stars 2 forks source link

Node 12 support #118

Open sourcier opened 4 years ago

sourcier commented 4 years ago

It is not possible to do either yarn install or npm install on node v12:

yarn install v1.22.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning " > babel-eslint@10.0.3" has unmet peer dependency "eslint@>= 4.12.1".
warning " > terser-webpack-plugin@1.4.1" has unmet peer dependency "webpack@^4.0.0".
warning " > boiler-room-runner@2.1.0" has unmet peer dependency "history@^3.2.0".
warning "boiler-room-runner > react-router-scroll@0.4.4" has unmet peer dependency "history@^2.0.0 || ^3.0.0".
warning "boiler-room-runner > scroll-behavior@0.8.1" has unmet peer dependency "history@^1.12.1 || ^2.0.0".
warning " > dotenv-webpack@1.7.0" has unmet peer dependency "webpack@^1 || ^2 || ^3 || ^4".
warning "prismic-utils > react-dom@15.6.2" has incorrect peer dependency "react@^15.6.2".
warning " > react-dates@20.3.0" has unmet peer dependency "react-with-direction@^1.3.0".
warning " > react-rangeslider@2.2.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
warning " > react-slider@0.11.2" has unmet peer dependency "prop-types@^15.6".
warning " > react-slider@0.11.2" has unmet peer dependency "create-react-class@^15.6".
warning " > supporticon@3.19.3" has incorrect peer dependency "constructicon@^1.8.0".
warning " > copy-webpack-plugin@5.0.5" has unmet peer dependency "webpack@^4.0.0".
warning " > enzyme@2.9.1" has incorrect peer dependency "react@0.13.x || 0.14.x || ^15.0.0-0 || 15.x".
warning " > enzyme-adapter-react-16@1.15.1" has incorrect peer dependency "enzyme@^3.0.0".
warning " > moxios@0.4.0" has unmet peer dependency "axios@>= 0.13.0".
warning " > optimize-css-assets-webpack-plugin@5.0.3" has unmet peer dependency "webpack@^4.0.0".
[4/4] πŸ”¨  Building fresh packages...
[-/4] β’€ waiting...
[-/4] β’€ waiting...
[3/4] β’€ kexec
error /Users/rrajaratnam/Tresors/blackbaud/wateraid-march-for-water/node_modules/kexec: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/rrajaratnam/Tresors/blackbaud/wateraid-march-for-water/node_modules/kexec
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.16.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args   '/Users/rrajaratnam/.nvm/versions/node/v12.16.0/lib/node_modules/npm/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/rrajaratnam/Tresors/blackbaud/wateraid-march-for-water/node_modules/kexec/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/rrajaratnam/.nvm/versions/node/v12.16.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/rrajaratnam/Library/Caches/node-gyp/12.16.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/rrajaratnam/Library/Caches/node-gyp/12.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/rrajaratnam/.nvm/versions/node/v12.16.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/rrajaratnam/Tresors/blackbaud/wateraid-march-for-water/node_modules/kexec',
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 info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/kexec/src/kexec.o
../src/kexec.cc:19:11: error: no member named 'Handle' in namespace 'v8'
using v8::Handle;
      ~~~~^
../src/kexec.cc:68:27: error: no matching constructor for initialization of 'String::Utf8Value'
        String::Utf8Value str(info[0]);
                          ^   ~~~~~~~
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3142:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3135:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
../src/kexec.cc:78:27: error: no matching constructor for initialization of 'String::Utf8Value'
        String::Utf8Value str(info[0]);
                          ^   ~~~~~~~
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3142:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3135:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
../src/kexec.cc:91:75: error: no matching member function for call to 'ToString'
            String::Utf8Value arg(argv_handle->Get(Nan::New<Integer>(i))->ToString());
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:2668:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:2684:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../src/kexec.cc:91:48: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
            String::Utf8Value arg(argv_handle->Get(Nan::New<Integer>(i))->ToString());
                                               ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3553:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/kexec.cc:115:6: error: variable has incomplete type 'void'
void init (Handle<Object> exports) {
     ^
../src/kexec.cc:115:12: error: use of undeclared identifier 'Handle'
void init (Handle<Object> exports) {
           ^
../src/kexec.cc:115:19: error: 'Object' does not refer to a value
void init (Handle<Object> exports) {
                  ^
/Users/rrajaratnam/Library/Caches/node-gyp/12.16.0/include/node/v8.h:3496:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/kexec.cc:115:27: error: use of undeclared identifier 'exports'
void init (Handle<Object> exports) {
                          ^
../src/kexec.cc:115:35: error: expected ';' after top level declarator
void init (Handle<Object> exports) {
                                  ^
                                  ;
1 warning and 9 errors generated.
make: *** [Release/obj.target/kexec/src/kexec.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/rrajaratnam/.nvm/versions/node/v12.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/rrajaratnam/.nvm/versions/node/v12.16.0/bin/node" "/Users/rrajaratnam/.nvm/versions/node/v12.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rrajaratnam/Tresors/blackbaud/wateraid-march-for-water/node_modules/kexec
gyp ERR! node -v v12.16.0

This is caused by the kexec package, which seems to be no longer supported, can this be removed?

sourcier commented 4 years ago

There is an open PR (+6 months) to enable support for v12: https://github.com/jprichardson/node-kexec/pull/37

i-am-al-x commented 2 years ago

As mentioned in "Bounty Source", check out my question and answer at this StackOverflow URL:

https://stackoverflow.com/questions/70884111/fix-kexec-error-failure-problem-broken-that-prevents-unable-to-npm-inst/70884112#70884112

Of course, we would prefer that "kexec v4.0.0" got pulled into the Master branch, but until then, use workarounds.