leafer-ui
leafer-ui copied to clipboard
node版本安装skia-canvas失败,求救
本地node版本是v18,安装报错如下:
npm ERR! > [email protected] build
npm ERR! > cargo-cp-artifact -nc lib/v6/index.node -- cargo build --message-format=json-render-diagnostics --release
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp info check checked for "/Users/liuqingfang/Desktop/hudong/hudong/jiaoyou/code/cloudfunctions/blmp-leafer2/node_modules/skia-canvas/lib/v6/index.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/samizdatco/skia-canvas/releases/download/v1.0.2/darwin-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install request to https://github.com/samizdatco/skia-canvas/releases/download/v1.0.2/darwin-x64-unknown.tar.gz failed, reason: socket hang up
npm ERR! node-pre-gyp ERR! install error
npm ERR! node-pre-gyp ERR! stack FetchError: request to https://github.com/samizdatco/skia-canvas/releases/download/v1.0.2/darwin-x64-unknown.tar.gz failed, reason: socket hang up
npm ERR! node-pre-gyp ERR! stack at ClientRequest.<anonymous> (/Users/liuqingfang/Desktop/hudong/hudong/jiaoyou/code/cloudfunctions/blmp-leafer2/node_modules/node-fetch/lib/index.js:1501:11)
npm ERR! node-pre-gyp ERR! stack at ClientRequest.emit (node:events:514:28)
npm ERR! node-pre-gyp ERR! stack at TLSSocket.socketOnEnd (node:_http_client:525:9)
npm ERR! node-pre-gyp ERR! stack at TLSSocket.emit (node:events:526:35)
npm ERR! node-pre-gyp ERR! stack at endReadableNT (node:internal/streams/readable:1359:12)
npm ERR! node-pre-gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! node-pre-gyp ERR! System Darwin 21.6.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/liuqingfang/Desktop/hudong/hudong/jiaoyou/code/cloudfunctions/blmp-leafer2/node_modules/.bin/node-pre-gyp" "install"
npm ERR! node-pre-gyp ERR! cwd /Users/liuqingfang/Desktop/hudong/hudong/jiaoyou/code/cloudfunctions/blmp-leafer2/node_modules/skia-canvas
npm ERR! node-pre-gyp ERR! node -v v18.17.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok
npm ERR! Error: could not find the `cargo` executable.
npm ERR!
npm ERR! You can find instructions for installing Rust and Cargo at:
npm ERR!
npm ERR! https://www.rust-lang.org/tools/install
npm ERR!
npm ERR!
npm ERR! Did not copy "cdylib:skia-canvas"
没安装 cargo ?
这玩意要先编译,虽然我下1.0.2的skia-canvas是可以正常下