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

node_modules/canvas npm ERR! command failed的更多相关文章

  1. npm install出错,npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting url-parse@1.4.3

    npm install时出现以下错误: npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting url-parse ...

  2. win7升级到win10系统后,node13升级为node16,node版本node-sass版本与不匹配,导致出现npm ERR! ERESOLVE could not resolve

    1. 错误npm ERR! code ERESOLVE 系统从win7升级到win10,之前的node版本是13.14.0,现在版本是16.17.1.正常的vue程序无法正常运行.从网上查询得知&qu ...

  3. npm ERR! path: '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri' }

    在安装appium 或者升级npm的过程中会遇到这个问题.出错时的代码提示如下: npm ERR! path /usr/local/lib/node_modules/npm/node_modules/ ...

  4. npm ERR! Error: socket hang up

    when i use npm to install express, it goes this message: npm info it worked if it ends with ok npm i ...

  5. npm ERR! code ENOENT

    npm ERR! path F:\VsCodeWorkspace\labWeb\front\LabWebAdminFrontEnd\node_modules\core-jsnpm ERR! code ...

  6. npm install报错 npm ERR! enoent ENOENT: no such file or directory

    在npm之后出现如下错误: $ npm install npm WARN checkPermissions Missing write access to /Users/lucas/code/js/v ...

  7. Nodejs的npm安装模块时候报错:npm ERR! Error: CERT_UNTRUSTED的解决方法

    npm http GET https://registry.npmjs.org/grunt-cli npm http GET https://registry.npmjs.org/grunt-cli ...

  8. cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,

    1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://reg ...

  9. 安装Vue2的devtools发生错误npm ERR! code EINTEGRITY npm ERR! sha1-HTFDXrRzR2Ew8Bv9zlMSCVgPsS0= integrity checksum failed when using sha1: wanted sha1-HTFDXrRzR2Ew8Bv9zlMSCVgPsS0= but got sha1-Z6BeTMF4nhAO6h5A

    1.github下载地址:https://github.com/vuejs/vue-devtools 2.下载好后进入vue-devtools-master工程  执行npm install ---- ...

  10. 解决npm ERR! Please try running this command again as root/Administrator. 问题

    win10下,使用npm 安装插件时报npm ERR! Please try running this command again as root/Administrator的错误, 解决方案:需要删 ...

随机推荐

  1. 野火STM32 ADC独立模式单通道采集实验意外

    1 //about calibration 2 //ADC_ResetCalibration(ADC1); 3 //while(ADC_GetResetCalibrationStatus(ADC1) ...

  2. vue项目中禁用浏览器缓存配置案例

    项目发布新版本,部署线上后用户浏览器需要清理缓存 1.public文件夹中修改 index.html文件meta配置 <meta http-equiv="Cache-Control&q ...

  3. 使用python和adb来学习(学习通)

    在某一天赶课比较着急,奈何找不到人可以帮我,于是自己动手写了一个简单的脚本来学习 准备工作: 1.需要一个你不用的手机,打开手机的adb,因为需要用到adb来操作手机 2.进入百度智能云,申请一个 通 ...

  4. @Resource 与@Autowired 区别

    @Resource与@Autowired两个的作用是相同的,很多人因为个人习惯选择用的不同,但是他们两个本质上还有有一定的区别的,可以参考区别来选择具体用哪一个: @Autowired与@Resour ...

  5. C# 报表接口样例,简单实用

    //连接视图名称,视图在数据库写好<%@ WebHandler Language="C#" Class="GetwmsReport" %> usin ...

  6. 拼多多anti-content核心算法完全解密+修复

    今天偶然看到拼多多的ant-content好奇就搞了下. 解密方法和代码 代码是用ast来解密的.利用babel处理,解密一部分+手动修复代码. AST相关的教程和文档 https://steaken ...

  7. 图文并茂解释开源许可证 GPL、BSD、MIT、Mozilla、Apache和LGPL的区别?

    BSD开源协议BSD开源协议是一个给于使用者很大自由的协议.基本上使用者可以"为所欲为",可以自由的使用,修改源代码,也可以将修改后的代码作为开源或者专有软件再发布. 但" ...

  8. Linux编辑器

    Vim 安装: yum install vim $ vim test.cnf  --打开文件 命令模式: i  --切换到输入模式,以输入字符 :  --切换到底线命令模式,以在最底一行输入命令 输入 ...

  9. 虚拟机中 Linux 提示“设备上没有空间”,扩容磁盘

    查看一下磁盘空间使用情况 #df -hl 已使用100% ls /dev/sd*  先查看一下现有sd系统硬盘 关机,存个快照(存不存无所谓),然后在虚拟机设置里添加扩展磁盘容量,选择SCSI类型 重 ...

  10. 关于pytest生成测试报告

    之前用pytest集成allure,记录的很清楚确实很好,但是我不知道怎么把生成的所有结果通过邮箱发送 可以使用pytest-html生成的html是这样的 也很清楚 但是!!!!!!!!!!!!!! ...