Mac node

编程入门 行业动态 更新时间:2024-10-10 12:19:22

<a href=https://www.elefans.com/category/jswz/34/1771250.html style=Mac node"/>

Mac node

基本报错

../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value'v8::String::Utf8Value string(value);^      ~~~~~
/Users/hongsen.ren/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no knownconversion from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argumentUtf8Value(const Utf8Value&) = delete;^
/Users/hongsen.ren/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires2 arguments, but 1 was providedUtf8Value(Isolate* isolate, Local<v8::Value> obj);^
1 error generated.
make: *** [Release/obj.target/binding/src/create_string.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/hongsen.ren/code/bk_cmdb/bk-cmdb/src/ui/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/Users/hongsen.ren/code/bk_cmdb/bk-cmdb/src/ui/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/hongsen.ren/code/bk_cmdb/bk-cmdb/src/ui/node_modules/node-sass
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1

其实很简单,根据node和npm的版本指定要安装的node-sass版本

System Darwin 18.6.0
node -v v12.1.0
node-gyp -v v3.8.0
npm -v 6.9.0

最终安装成功

npm install node-sass@4.12.0

更多推荐

Mac node

本文发布于:2024-02-24 20:38:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1696584.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Mac   node

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!