最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

npm 在“npm install”时崩溃,不能再使用 JS 或卸载包

网站源码admin34浏览0评论

npm 在“npm install”时崩溃,不能再使用 JS 或卸载包

npm 在“npm install”时崩溃,不能再使用 JS 或卸载包

我正在尝试逐步跟进这个project,但它在 ubuntu 22.04(而不是 ubuntu 18)上崩溃了。

我在使用 python 和许多包时遇到过类似的问题(似乎 js 和 py 不能很好地处理它们的旧包)对不起,这让我发疯了。

因此,如项目中所述,我键入

npm install
并且它中断了(请参阅下面的错误)。 我试图卸载所有节点并从 prject 运行 generate.js 脚本并安装运行它时所需的任何依赖项。

当尝试使用 render.html 渲染结果时,抛出了一个错误,指出未定义 loadFile(),因此我尝试安装所有其他包,以防出现未安装包的问题。 这是狗屎再次击中粉丝的时候......

npm 版本:

8.5.1
节点版本:
v12.22.9

这里是描述错误,打起精神来!

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '0.8.x' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code 1
npm ERR! path /home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make : on entre dans le répertoire « /home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position/build »
npm ERR!   CXX(target) Release/obj.target/pos/src/pos.o
npm ERR! make : on quitte le répertoire « /home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position/build »
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/share/nodejs/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   '/home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/include/nodejs/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=/usr/include/nodejs',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position',
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/pos: In function ‘void Method(const v8::FunctionCallbackInfo<v8::Value>&)’:
npm ERR! ../src/pos:256:33: warning: ‘static v8::Local<v8::String> v8::String::NewFromUtf8(v8::Isolate*, const char*, v8::String::NewStringType, int)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   256 |     pos->Set(String::NewFromUtf8(isolate, "row"), Number::New(isolate, row));
npm ERR!       |              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-internal.h:14,
npm ERR!                  from /usr/include/nodejs/deps/v8/include/v8.h:27,
npm ERR!                  from ../src/pos:1:
npm ERR! /usr/include/nodejs/deps/v8/include/v8.h:3032:21: note: declared here
npm ERR!  3032 |       Local<String> NewFromUtf8(Isolate* isolate, const char* data,
npm ERR!       |                     ^~~~~~~~~~~
npm ERR! /usr/include/nodejs/deps/v8/include/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/pos:256:13: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   256 |     pos->Set(String::NewFromUtf8(isolate, "row"), Number::New(isolate, row));
npm ERR!       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-internal.h:14,
npm ERR!                  from /usr/include/nodejs/deps/v8/include/v8.h:27,
npm ERR!                  from ../src/pos:1:
npm ERR! /usr/include/nodejs/deps/v8/include/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /usr/include/nodejs/deps/v8/include/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/pos:257:33: warning: ‘static v8::Local<v8::String> v8::String::NewFromUtf8(v8::Isolate*, const char*, v8::String::NewStringType, int)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   257 |     pos->Set(String::NewFromUtf8(isolate, "col"), Number::New(isolate, col));
npm ERR!       |              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-internal.h:14,
npm ERR!                  from /usr/include/nodejs/deps/v8/include/v8.h:27,
npm ERR!                  from ../src/pos:1:
npm ERR! /usr/include/nodejs/deps/v8/include/v8.h:3032:21: note: declared here
npm ERR!  3032 |       Local<String> NewFromUtf8(Isolate* isolate, const char* data,
npm ERR!       |                     ^~~~~~~~~~~
npm ERR! /usr/include/nodejs/deps/v8/include/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/pos:257:13: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
npm ERR!   257 |     pos->Set(String::NewFromUtf8(isolate, "col"), Number::New(isolate, col));
npm ERR!       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /usr/include/nodejs/deps/v8/include/v8-internal.h:14,
npm ERR!                  from /usr/include/nodejs/deps/v8/include/v8.h:27,
npm ERR!                  from ../src/pos:1:
npm ERR! /usr/include/nodejs/deps/v8/include/v8.h:3499:22: note: declared here
npm ERR!  3499 |                 bool Set(Local<Value> key, Local<Value> value));
npm ERR!       |                      ^~~
npm ERR! /usr/include/nodejs/deps/v8/include/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
npm ERR!   328 |   declarator __attribute__((deprecated(message)))
npm ERR!       |   ^~~~~~~~~~
npm ERR! ../src/pos:243:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
npm ERR!   243 |         int ret, row, col;
npm ERR!       |             ^~~
npm ERR! ../src/pos: At global scope:
npm ERR! ../src/pos:261:6: error: variable or field ‘Init’ declared void
npm ERR!   261 | void Init(Handle<Object> exports) {
npm ERR!       |      ^~~~
npm ERR! ../src/pos:261:11: error: ‘Handle’ was not declared in this scope
npm ERR!   261 | void Init(Handle<Object> exports) {
npm ERR!       |           ^~~~~~
npm ERR! ../src/pos:261:24: error: expected primary-expression before ‘>’ token
npm ERR!   261 | void Init(Handle<Object> exports) {
npm ERR!       |                        ^
npm ERR! ../src/pos:261:26: error: ‘exports’ was not declared in this scope
npm ERR!   261 | void Init(Handle<Object> exports) {
npm ERR!       |                          ^~~~~~~
npm ERR! In file included from ../src/pos:2:
npm ERR! ../src/pos:267:20: error: ‘Init’ was not declared in this scope; did you mean ‘node::Init’?
npm ERR!   267 | NODE_MODULE(hello, Init)
npm ERR!       |                    ^~~~
npm ERR! /usr/include/nodejs/src/node.h:736:36: note: in definition of macro ‘NODE_MODULE_X’
npm ERR!   736 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |                                    ^~~~~~~
npm ERR! ../src/pos:267:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!   267 | NODE_MODULE(hello, Init)
npm ERR!       | ^~~~~~~~~~~
npm ERR! /usr/include/nodejs/src/node.h:229:18: note: ‘node::Init’ declared here
npm ERR!   229 | NODE_EXTERN void Init(int* argc,
npm ERR!       |                  ^~~~
npm ERR! make: *** [pos.target.mk:109 : Release/obj.target/pos/src/pos.o] Erreur 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/share/nodejs/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Linux 5.19.0-41-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/share/nodejs/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/simon/Documents/CMRO2/next-frame_prediction/DDPAE-video-prediction/datasets/bouncing_balls/src/js/node_modules/get-cursor-position
npm ERR! gyp ERR! node -v v12.22.9
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/simon/.npm/_logs/2023-04-27T08_23_25_524Z-debug-0.log

有史以来最好的解释错误......

如果有人可以帮助解密这些类似密码的错误,我将不胜感激(虽然没有死)

谢谢。

回答如下:
发布评论

评论列表(0)

  1. 暂无评论