创建一个react项目无法创建成功,一直抱这个错,有大神知道什么原因吗?
图片
详情
npm ERR! code 1
npm ERR! path /Users/caijizhou/Documents/reactdemo/demo/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! /bin/sh: pkg-config: command not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/caijizhou/Documents/reactdemo/demo/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Darwin 18.7.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/15.1.0/bin/node" "/Users/caijizhou/Documents/reactdemo/demo/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/caijizhou/Documents/reactdemo/demo/node_modules/canvas
npm ERR! gyp ERR! node -v v15.1.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/caijizhou/.npm/_logs/2020-11-07T03_16_50_623Z-debug.log
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…