Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用npm安装节点gyp重建失败_Javascript_Node.js_Node Gyp - Fatal编程技术网

Javascript 使用npm安装节点gyp重建失败

Javascript 使用npm安装节点gyp重建失败,javascript,node.js,node-gyp,Javascript,Node.js,Node Gyp,我使用的是npm7.6.3和节点v14.16.0。我正在尝试安装包[校对器][1],它需要包节点gyp 但是,当运行sudo npm install proofreader时,我得到以下错误: 644 timing build:link Completed in 14ms 645 info run nodehun@2.0.12 install node_modules/nodehun node-gyp rebuild 646 info run nodehun@2.0.12 install { c

我使用的是
npm7.6.3
节点v14.16.0
。我正在尝试安装包[校对器][1],它需要包节点gyp

但是,当运行
sudo npm install proofreader
时,我得到以下错误:

644 timing build:link Completed in 14ms
645 info run nodehun@2.0.12 install node_modules/nodehun node-gyp rebuild
646 info run nodehun@2.0.12 install { code: 1, signal: null }
647 timing reify:rollback:createSparse Completed in 2621ms
648 timing reify:rollback:retireShallow Completed in 0ms
649 timing command:install Completed in 51213ms
650 verbose stack Error: command failed
650 verbose stack   at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
650 verbose stack   at ChildProcess.emit (events.js:315:20)
650 verbose stack   at maybeClose (internal/child_process.js:1048:16)
650 verbose stack   at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
651 verbose pkgid nodehun@2.0.12
652 verbose cwd /home/admin/Desktop/project
653 verbose Linux 5.4.0-70-generic
654 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "proofreader"
655 verbose node v14.16.0
656 verbose npm v7.6.3
657 error code 1
658 error path /home/admin/Desktop/project/node_modules/nodehun
659 error command failed
660 error command sh -c node-gyp rebuild
661 error make: Entering directory '/home/admin/Desktop/project/node_modules/nodehun/build'
661 error  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/affentry.o
...
661 error  AR(target) Release/obj.target/src/hunspell.a
661 error  COPY Release/hunspell.a
661 error  CXX(target) Release/obj.target/nodehun/src/nodehun.o
661 error nodehun.target.mk:118: recipe for target 'Release/obj.target/nodehun/src/nodehun.o' failed
661 error make: Leaving directory '/home/admin/Desktop/project/node_modules/nodehun/build'
662 error gyp info it worked if it ends with ok
662 error gyp info using node-gyp@7.1.2
662 error gyp info using node@14.16.0 | linux | x64
662 error gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
662 error gyp info spawn /usr/bin/python3
662 error gyp info spawn args [
662 error gyp info spawn args  '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
662 error gyp info spawn args  'binding.gyp',
662 error gyp info spawn args  '-f',
662 error gyp info spawn args  'make',
662 error gyp info spawn args  '-I',
662 error gyp info spawn args  '/home/admin/Desktop/project/node_modules/nodehun/build/config.gypi',
662 error gyp info spawn args  '-I',
662 error gyp info spawn args  '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
662 error gyp info spawn args  '-I',
662 error gyp info spawn args  '/home/admin/.cache/node-gyp/14.16.0/include/node/common.gypi',
662 error gyp info spawn args  '-Dlibrary=shared_library',
662 error gyp info spawn args  '-Dvisibility=default',
662 error gyp info spawn args  '-Dnode_root_dir=/home/admin/.cache/node-gyp/14.16.0',
662 error gyp info spawn args  '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
662 error gyp info spawn args  '-Dnode_lib_file=/home/admin/.cache/node-gyp/14.16.0/<(target_arch)/node.lib',
662 error gyp info spawn args  '-Dmodule_root_dir=/home/admin/Desktop/project/node_modules/nodehun',
662 error gyp info spawn args  '-Dnode_engine=v8',
662 error gyp info spawn args  '--depth=.',
662 error gyp info spawn args  '--no-parallel',
662 error gyp info spawn args  '--generator-output',
662 error gyp info spawn args  'build',
662 error gyp info spawn args  '-Goutput_dir=.'
662 error gyp info spawn args ]
662 error gyp info spawn make
662 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
662 error ../src/hunspell/src/hunspell/hunspell.cxx: In member function ‘bool HunspellImpl::spell(const string&, int*, std::__cxx11::string*)’:
662 error ../src/hunspell/src/hunspell/hunspell.cxx:565:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
662 error    }
662 error    ^
662 error ../src/hunspell/src/hunspell/hunspell.cxx:567:5: note: here
662 error   case INITCAP: {
662 error   ^~~~
662 error ../src/hunspell/src/hunspell/hunspell.cxx: In member function ‘std::vector<std::__cxx11::basic_string<char> > HunspellImpl::suggest(const string&)’:
662 error ../src/hunspell/src/hunspell/hunspell.cxx:903:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
662 error    capwords = 1;
662 error    ~~~~~~~~~^~~
662 error ../src/hunspell/src/hunspell/hunspell.cxx:904:5: note: here
662 error   case HUHCAP: {
662 error   ^~~~
662 error ../src/hunspell/src/hunspell/hunspell.cxx:1015:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
662 error     capwords = 1;
662 error     ~~~~~~~~~^~~
662 error ../src/hunspell/src/hunspell/hunspell.cxx:1016:7: note: here
662 error    case HUHCAP: {
662 error    ^~~~
662 error ../src/hunspell/src/hunspell/strmgr.cxx: In member function ‘int StrMgr::fail(const char*)’:
662 error ../src/hunspell/src/hunspell/strmgr.cxx:79:22: warning: format not a string literal and no format arguments [-Wformat-security]
662 error  fprintf(stderr, err);
662 error            ^
662 error In file included from ../src/post0.12.0/nodehun.cpp:1:0,
662 error         from ../src/nodehun.cpp:7:
662 error ../src/post0.12.0/nodehun.hpp:131:24: error: ‘v8::Handle’ has not been declared
662 error  static void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>);
662 error             ^~~~~~
662 error ../src/post0.12.0/nodehun.hpp:131:30: error: expected ‘,’ or ‘...’ before ‘<’ token
662 error  static void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>);
662 error                ^
662 error In file included from ../src/nodehun.cpp:7:0:
662 error ../src/post0.12.0/nodehun.cpp:7:37: error: variable or field ‘Init’ declared void
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                   ^~~~~~
662 error ../src/post0.12.0/nodehun.cpp:7:37: error: ‘Handle’ was not declared in this scope
662 error ../src/post0.12.0/nodehun.cpp:7:37: note: suggested alternative: ‘rand_r’
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                   ^~~~~~
662 error                   rand_r
662 error ../src/post0.12.0/nodehun.cpp:7:50: error: expected primary-expression before ‘>’ token
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                          ^
662 error ../src/post0.12.0/nodehun.cpp:7:52: error: ‘exports’ was not declared in this scope
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                           ^~~~~~~
662 error ../src/post0.12.0/nodehun.cpp:7:61: error: ‘Handle’ was not declared in this scope
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                               ^~~~~~
662 error ../src/post0.12.0/nodehun.cpp:7:61: note: suggested alternative: ‘rand_r’
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                               ^~~~~~
662 error                               rand_r
662 error ../src/post0.12.0/nodehun.cpp:7:74: error: expected primary-expression before ‘>’ token
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                                      ^
662 error ../src/post0.12.0/nodehun.cpp:7:76: error: ‘module’ was not declared in this scope
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                                       ^~~~~~
662 error ../src/post0.12.0/nodehun.cpp:7:76: note: suggested alternative: ‘mode_t’
662 error void Nodehun::SpellDictionary::Init(Handle<Object> exports, Handle<Object> module)
662 error                                       ^~~~~~
662 error                                       mode_t
662 error ../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::createNewNodehun(const v8::FunctionCallbackInfo<v8::Value>&)’:
662 error ../src/post0.12.0/nodehun.cpp:51:101: error: no matching function for call to ‘v8::Exception::TypeError(v8::MaybeLocal<v8::String>)’
662 error    argv[0] = Exception::TypeError(String::NewFromUtf8(isolate, "First argument must be a buffer"));
662 error                                                                                                  ```

Any suggestions what I am doing wrong?

I appreciate our replies!

 [1]: https://github.com/kdzwinel/Proofreader
644定时构建:链接在14毫秒内完成
645信息运行nodehun@2.0.12安装node_模块/nodehun节点gyp重建
646信息运行nodehun@2.0.12安装{代码:1,信号:null}
647定时具体化:回滚:createSparse在2621ms内完成
648定时具体化:回滚:在0毫秒内完成
649定时命令:安装在51213ms内完成
650详细堆栈错误:命令失败
在子进程中有650个详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise spawn/index.js:64:27)
650 ChildProcess.emit上的详细堆栈(events.js:315:20)
maybeClose的650详细堆栈(internal/child_process.js:1048:16)
650 Process.ChildProcess.\u handle.onexit处的详细堆栈(internal/child\u Process.js:288:5)
651详细的pkgidnodehun@2.0.12
652详细cwd/主页/管理员/桌面/项目
653详细Linux 5.4.0-70-generic
654详细argv“/usr/local/bin/node”“/usr/local/bin/npm”“安装”“校对器”
655详细节点v14.16.0
656详细npm v7.6.3
657错误代码1
658错误路径/home/admin/Desktop/project/node_模块/nodehun
659错误命令失败
660错误命令sh-c节点gyp重建
661错误:输入目录“/home/admin/Desktop/project/node\u modules/nodehun/build”
661错误CXX(目标)发布/obj.target/hunspell/src/hunspell/src/hunspell/afentry.o
...
661错误AR(目标)发布/obj.target/src/hunspell.a
661复制发布/拼写错误。a
661错误CXX(目标)发布/obj.target/nodehun/src/nodehun.o
661错误nodehun.target.mk:118:目标“Release/obj.target/nodehun/src/nodehun.o”的配方失败
661生成错误:离开目录“/home/admin/Desktop/project/node\u modules/nodehun/build”
662错误gyp信息如果以ok结束,则有效
662错误gyp信息使用节点-gyp@7.1.2
662错误gyp信息使用node@14.16.0| linux | x64
662错误gyp info使用Python版本3.6.9查找Python在“/usr/bin/python3”处找到
662错误gyp信息生成/usr/bin/python3
662错误gyp信息生成参数[
662错误gyp info spawn args'/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/gyp_main.py',
662错误gyp信息生成参数“binding.gyp”,
662错误gyp信息生成参数'-f',
662错误gyp信息生成参数“make”,
662错误gyp信息生成参数'-I',
662错误gyp info spawn args'/home/admin/Desktop/project/node_modules/nodehun/build/config.gypi',
662错误gyp信息生成参数'-I',
662错误gyp info spawn args'/usr/local/lib/node_modules/npm/node_modules/node gyp/addon.gypi',
662错误gyp信息生成参数'-I',
662错误gyp info spawn args'/home/admin/.cache/node gyp/14.16.0/include/node/common.gypi',
662错误gyp信息生成参数'-Dlibrary=shared_library',
662错误gyp信息生成参数'-Dvisibility=default',
662错误gyp info spawn args'-Dnode_root_dir=/home/admin/.cache/node gyp/14.16.0',
662错误gyp info spawn args'-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node gyp',
662错误gyp info spawn args'-Dnode_lib_file=/home/admin/.cache/node gyp/14.16.0/