node_modules/canvas npm ERR! command failed
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript...
npm ERR! code 1
npm ERR! path /Users/Tutorial/my-react-project/my-react-app/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c -- node-gyp rebuild
npm ERR! Package pixman-1 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pixman-1.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pixman-1' found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 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/Tutorial/my-react-project/my-react-app/node_modules/node-gyp/lib/configure.js:259:16)
如果使用create-react-app创建项目的时候报上面的错,可能是确认了一下环境依赖,
可以尝试下面表格里面的方法。
npm ERR! gyp ERR! cwd /Users/Tutorial/my-react-project/my-react-app/node_modules/canvas
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/.npm/_logs/2022-11-15T02_01_43_860Z-debug-0.log
最新文章
- Android ooVoo Apk附件关联分析
- HTML5 Canvas一些常用的操作
- Struts2(十三)国际化-internationalization
- jquery学习记录
- 关键字提取算法之TF-IDF扫盲
- linux:ifconfig命令
- 【Spring五】AOP之使用注解配置
- 使用const 提高函数的健壮性
- python虚拟环境搭建大全(转)
- pythonのdjango Form简单应用。
- WebService的两种方式SOAP和REST有什么不同?
- 基于阿里云 DNS API 实现的 DDNS 工具
- LeetCode-860. Lemonade Change
- docker私有仓库搭建和资源限制
- DragonBones龙骨骨骼中的自定义事件(另有声音、动画事件)
- 温故而知新-mysql的一些语法show,describe,explain,fulltext
- .Net Core 跨平台应用使用串口、串口通信 ,可能出现的问题、更简洁的实现方法
- nyoj----522 Interval (简单树状数组)
- [NOIP2009]靶形数独 深搜+枝杈优化
- 目标检测 — NMS