NdYAG / Kindle2Anki

Export Vocabulary Builder to Anki APKG
MIT License
95 stars 3 forks source link

Installation issues #4

Open johan456789 opened 4 years ago

johan456789 commented 4 years ago

The output after running npm install:

> integer@1.0.7 install /Users/johan/repos/Kindle2Anki/node_modules/integer
> node-gyp rebuild

  CXX(target) Release/obj.target/integer/src/integer.o
../src/integer.cpp:329:21: error: no matching constructor for initialization of
      'v8::String::Value'
                v8::String::Value utf16(string);
                                  ^     ~~~~~~
/Users/johan/Library/Caches/node-gyp/14.6.0/include/node/v8.h:3317:5: note: 
      candidate constructor not viable: no known conversion from
      'v8::Local<v8::String>' to 'const v8::String::Value' for 1st argument
    Value(const Value&) = delete;
    ^
/Users/johan/Library/Caches/node-gyp/14.6.0/include/node/v8.h:3310:5: note: 
      candidate constructor not viable: requires 2 arguments, but 1 was provided
    Value(Isolate* isolate, Local<v8::Value> obj);
    ^
1 error generated.
make: *** [Release/obj.target/integer/src/integer.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/14.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/johan/repos/Kindle2Anki/node_modules/integer
gyp ERR! node -v v14.6.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN Kindle2Anki@0.0.1 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer@1.0.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the integer@1.0.7 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!     /Users/johan/.npm/_logs/2020-08-15T12_58_03_791Z-debug.log
aidan-gibson commented 3 years ago

Same. macOS 11.6

➜ Kindle2Anki-master sudo npm install Password: npm WARN deprecated domelementtype@1.3.0: update to domelementtype@1.3.1 npm ERR! code 1 npm ERR! path /Users/aidangibson/Desktop/Kindle2Anki-master/node_modules/integer npm ERR! command failed npm ERR! command sh -c node tools/install npm ERR! CXX(target) Release/obj.target/integer/src/integer.o npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.17.6 | darwin | x64 npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/local/opt/python@3.9/bin/python3.9" npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/aidangibson/Desktop/Kindle2Anki-master/node_modules/integer/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/aidangibson/Library/Caches/node-gyp/14.17.6/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/aidangibson/Library/Caches/node-gyp/14.17.6', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/aidangibson/Library/Caches/node-gyp/14.17.6/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/aidangibson/Desktop/Kindle2Anki-master/node_modules/integer', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! ../src/integer.cpp:329:21: error: no matching constructor for initialization of 'v8::String::Value' npm ERR! v8::String::Value utf16(string); npm ERR! ^ ~~ npm ERR! /Users/aidangibson/Library/Caches/node-gyp/14.17.6/include/node/v8.h:3317:5: note: candidate constructor not viable: no known conversion from 'v8::Local' to 'const v8::String::Value' for 1st argument npm ERR! Value(const Value&) = delete; npm ERR! ^ npm ERR! /Users/aidangibson/Library/Caches/node-gyp/14.17.6/include/node/v8.h:3310:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided npm ERR! Value(Isolate* isolate, Local obj); npm ERR! ^ npm ERR! 1 error generated. npm ERR! make: *** [Release/obj.target/integer/src/integer.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) npm ERR! gyp ERR! System Darwin 20.6.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /Users/aidangibson/Desktop/Kindle2Anki-master/node_modules/integer npm ERR! gyp ERR! node -v v14.17.6 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/aidangibson/.npm/_logs/2021-10-04T03_23_44_847Z-debug.log

yinchyy commented 2 years ago

Try using older version of nodejs, it worked for me on v10.0