【发布时间】:2020-01-21 12:55:22
【问题描述】:
在使用节点 13.1.0 安装我的依赖项时收到一堆警告和错误。
C ++ -DNODE_GYP_MODULE_NAME =结合' '-DUSING_UV_SHARED = 1' '-DUSING_V8_SHARED = 1' '-DV8_DEPRECATION_WARNINGS = 1' '-DV8_DEPRECATION_WARNINGS''-DV8_IMMINENT_DEPRECATION_WARNINGS '-D_DARWIN_USE_64_BIT_INODE = 1''-D_LARGEFILE_SOURCE“-D_FILE_OFFSET_BITS = 64''-DOPENSSL_NO_PINSHARED''-DOPENSSL_THREADS''-DBUILDING_NODE_EXTENSION'-I/Users/marinosony/.node-gyp/13.1.0/include/node-I/Users/marinosony/.node-gyp/13.1.0/src -I/Users/marinosony/.node-gyp/13.1.0/deps/openssl/config -I/Users/marinosony/.node-gyp/13.1.0/deps/openssl/openssl/include -I/Users/marinosony /.node-gyp/13.1.0/deps/uv/include -I/Users/marinosony/.node-gyp/13.1.0/deps/zlib -I/Users/marinosony/.node-gyp/13.1.0/ deps/v8/include -I../../nan -I../src/libsass/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W - Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/binding/ src/create_string.o.d.raw -c -o 发布/obj.tar获取/绑定/src/create_string.o ../src/create_string.cpp ../src/create_string.cpp:17:25: 错误:没有匹配的构造函数用于初始化'v8::String::Utf8Value' v8::String::Utf8Value 字符串(值); ^ ~~~~~ /Users/marinosony/.node-gyp/13.1.0/include/node/v8.h:3064:5:注意:候选构造函数不可行:没有已知的转换 第一个参数的“v8::Local”到“const v8::String::Utf8Value” Utf8Value(const Utf8Value&) = 删除; ^ /Users/marinosony/.node-gyp/13.1.0/include/node/v8.h:3057:5:注意:候选构造函数不可行:需要2个参数,但1个是 假如 Utf8Value(Isolate* 隔离,本地 obj); ^ 产生 1 个错误。 make: *** [Release/obj.target/binding/src/create_string.o] 错误 1 吉普错误!构建错误 吉普错误!堆栈错误:
make失败,退出代码:2 吉普错误! ChildProcess.onExit 的堆栈(/Users/marinosony/Desktop/SofiaPaySys/SofiaAPI/node_modules/node-gyp/lib/build.js:262:23) 吉普错误! ChildProcess.emit (events.js:210:5) 的堆栈 吉普错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) 吉普错误!系统达尔文 19.2.0 吉普错误!命令“/usr/local/Cellar/node/13.1.0/bin/node”“/Users/marinosony/Desktop/SofiaPaySys/SofiaAPI/node_modules/node-gyp/bin/node-gyp.js”“重建”“- -verbose""--libsass_ext=""--libsass_cflags=""--libsass_ldflags=""--libsass_library=" 吉普错误! cwd /Users/marinosony/Desktop/SofiaPaySys/SofiaAPI/node_modules/node-sass 吉普错误!节点-v v13.1.0 吉普错误!节点gyp -v v3.8.0 吉普错误!不行
- 节点版本:13.1.0
- node-sass 版本:4.13.1
【问题讨论】:
-
您使用的是什么版本的 node 和 node-sass?请同时提供。
-
节点 v13.1.0 & node-sass 4.13.1。也许我需要将 node-sass 降级到 4.13.0 ??
-
是的,非常感谢。显然,我不得不降级 node 和 node-sass 版本。
-
我在 node v16 上遇到了同样的问题,降级到 node v14 并且工作正常
标签: node.js npm node-modules node-sass