gpt4 book ai didi

ruby-on-rails - yarn install --check-files 给了我我不明白的错误输出

转载 作者:行者123 更新时间:2023-12-04 03:34:23 26 4
gpt4 key购买 nike

我有一个 Ruby on Rails 项目,我正在新设置的服务器上部署它。
我运行命令 rails s -b 0.0.0.0它说:

========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
所以我运行它告诉我运行的命令,最终它失败了,出现了一些我不太理解的错误:
  g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/home/ubuntu/.node-gyp/16.0.0/include/node -I/home/ubuntu/.node-gyp/16.0.0/src -I/home/ubuntu/.node-gyp/16.0.0/deps/openssl/config -I/home/ubuntu/.node-gyp/16.0.0/deps/openssl/openssl/include -I/home/ubuntu/.node-gyp/16.0.0/deps/uv/include -I/home/ubuntu/.node-gyp/16.0.0/deps/zlib -I/home/ubuntu/.node-gyp/16.0.0/deps/v8/include -I../../nan -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from /home/ubuntu/.node-gyp/16.0.0/include/node/v8.h:30,
from /home/ubuntu/.node-gyp/16.0.0/include/node/node.h:63,
from ../../nan/nan.h:56,
from ../src/binding.cpp:1:
/home/ubuntu/.node-gyp/16.0.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/home/ubuntu/.node-gyp/16.0.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
| ^~~~~~~~~~~
| remove_cv
/home/ubuntu/.node-gyp/16.0.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
| ^~~~~~~~~~~
| remove_cv
/home/ubuntu/.node-gyp/16.0.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid
452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
| ^
/home/ubuntu/.node-gyp/16.0.0/include/node/v8-internal.h:452:63: error: ‘::Perform’ has not been declared
452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
| ^~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
284 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
| ^~~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
320 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
| ^~~~~~~~~~~~
In file included from ../../nan/nan.h:56,
from ../src/binding.cpp:1:
../src/binding.cpp: At global scope:
/home/ubuntu/.node-gyp/16.0.0/include/node/node.h:806:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
806 | (node::addon_register_func) (regfunc), \
| ^
/home/ubuntu/.node-gyp/16.0.0/include/node/node.h:840:3: note: in expansion of macro ‘NODE_MODULE_X’
840 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
358 | NODE_MODULE(binding, RegisterModule);
| ^~~~~~~~~~~
make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ubuntu/vendsmartsolutions/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (node:events:365:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 5.4.0-1038-aws
gyp ERR! command "/home/ubuntu/.nvm/versions/node/v16.0.0/bin/node" "/home/ubuntu/vendsmartsolutions/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/ubuntu/vendsmartsolutions/node_modules/node-sass
gyp ERR! node -v v16.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
make: Leaving directory '/home/ubuntu/vendsmartsolutions/node_modules/node-sass/build'
Build failed with error code: 1
我看了好几遍,我真的不知道它是什么意思。这个项目在我的开发虚拟机上运行良好。
任何帮助将不胜感激,谢谢。

最佳答案

似乎是nodeJS版本的问题。
我尝试了 node v15,它对我有用,而 v16 会失败。
此外,不推荐使用 node-sass。您应该更改要使用的另一个库。

关于ruby-on-rails - yarn install --check-files 给了我我不明白的错误输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67205719/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com