nodehun: node-v12.13.0 error
I get this compilation error while using node lts, hence node-v12.13.0
> nodehun@2.0.12 install /Users/loretoparisi/Documents/Projects/musixmatch-ai-console/webservice/node_modules/nodehun
> node-gyp rebuild
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/affentry.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/affixmgr.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/csutil.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/filemgr.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hashmgr.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hunspell.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hunzip.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/phonet.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/replist.o
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/strmgr.o
../src/hunspell/src/hunspell/strmgr.cxx:79:19: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
fprintf(stderr, err);
^~~
../src/hunspell/src/hunspell/strmgr.cxx:79:19: note: treat the string as an argument to avoid this
fprintf(stderr, err);
^
"%s",
1 warning generated.
CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/suggestmgr.o
LIBTOOL-STATIC Release/hunspell.a
CXX(target) Release/obj.target/nodehun/src/nodehun.o
In file included from ../src/nodehun.cpp:7:
In file included from ../src/post0.12.0/nodehun.cpp:1:
../src/post0.12.0/nodehun.hpp:131:24: error: no template named 'Handle' in namespace 'v8'
static void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>);
~~~~^
../src/post0.12.0/nodehun.hpp:131:48: error: no template named 'Handle' in namespace 'v8'
static void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>);
~~~~^
In file included from ../src/nodehun.cpp:7:
../src/post0.12.0/nodehun.cpp:7:32: error: variable has incomplete type 'void'
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
../src/post0.12.0/nodehun.cpp:7:37: error: use of undeclared identifier 'Handle'
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
../src/post0.12.0/nodehun.cpp:7:44: error: 'Object' does not refer to a value
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
/Users/loretoparisi/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3400:17: note: declared here
class V8_EXPORT Object : public Value {
^
In file included from ../src/nodehun.cpp:7:
../src/post0.12.0/nodehun.cpp:7:52: error: use of undeclared identifier 'exports'
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
../src/post0.12.0/nodehun.cpp:7:61: error: use of undeclared identifier 'Handle'
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
../src/post0.12.0/nodehun.cpp:7:68: error: 'Object' does not refer to a value
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
/Users/loretoparisi/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3400:17: note: declared here
class V8_EXPORT Object : public Value {
^
In file included from ../src/nodehun.cpp:7:
../src/post0.12.0/nodehun.cpp:7:76: error: use of undeclared identifier 'module'
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
../src/post0.12.0/nodehun.cpp:7:83: error: expected ';' after top level declarator
void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
^
;
10 errors generated.
make: *** [Release/obj.target/nodehun/src/nodehun.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:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/loretoparisi/Documents/Projects/node_modules/nodehun
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN musixmatch-ai-console@5.6.7-20191022 No repository field.
npm WARN musixmatch-ai-console@5.6.7-20191022 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodehun@2.0.12 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodehun@2.0.12 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/loretoparisi/.npm/_logs/2019-10-24T09_49_25_397Z-debug.log
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (7 by maintainers)
@Wulf confirmed! It works fine now with
Hey @loretoparisi after publishing and installing 3.0.0, everything worked just fine. I found and fixed an error with the type declaration file (will release the fix in 3.0.1).
Let me know if
"nodehun": "^3.0.0"fixes thenpm ERR! undefined ls-remote...error. If not, it might be the lock file (package-lock.jsonoryarn.lock). Try deleting that and runningnpm installagain.Thanks again for your time my dude!
@Wulf Hello, so I have tested
against both node v11 and v12 for back compatibility:
and
so for me it’s ok to move to latest 🚀
Sidenote: a lot of packages breaks with node v12, among then
nanby nodejs (!)…I will be stuck tonode v11for a while, but you can safely updatenodehunat least!@Wulf ok thank you I will try it.