目录
错误
node_modules/canvas/build/Release/canvas.node" (not found)
Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
解决办法
1.yarn config set canvas_binary_host_mirror "https://npm.taobao.org/mirrors/node-canvas-prebuilt/"
2.yarn config set canvas_binary_site "https://npm.taobao.org/mirrors/node-canvas-prebuilt/"