用npm install -g electron-forge安装失败,出现这样报错
../src/async.cc:52:46: error: no matching member function for call to 'ToObject'
v8::Local<v8::Object> bufferObj = value->ToObject();
3 warnings and 1 error generated.
make: *** [Release/obj.target/xattr/src/async.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/towhooh/.npm-global/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/towhooh/.npm-global/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/towhooh/.npm-global/lib/node_modules/electron-forge/node_modules/_fs-xattr@0.1.17@fs-xattr
gyp ERR! node -v v12.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[npminstall:runscript:error] electron-installer-dmg@0.2.1 › appdmg@0.4.5 › fs-xattr@^0.1.14 has binding.gyp file, run "node-gyp rebuild" error: Error [RunScriptError]: Run "sh -c node-gyp rebuild" error, exit code 1
不知道怎么解决
网友评论