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. Day 13 13.3 Cookie与Session

    Cookie 一.什么是cookie? cookie的本质就是一组数据(键值对的形式存在) 是由服务器创建,返回给客户端,最终会保存在客户端浏览器中. 如果客户端保存了cookie,则下次再次访问该服 ...

  2. k8s之pod的生命周期

    pod生命周期 和一个个独立的应用容器一样,Pod 也被认为是相对临时性(而不是长期存在)的实体. Pod 会被创建.赋予一个唯一的 ID(UID),并被调度到节点,并在终止(根据重启策略)或删除之前 ...

  3. 快捷方法1:csdn如何不登录复制代码

    按F12,在console里执行下面两句代码 $("#content_views pre").css("user-select","text" ...

  4. 解决为知笔记docker镜像部署后登录连接mysql报错

    https://www.wiz.cn/zh-cn/docker 部署正常后登录一切正常,但开机重启后登录用户名时报错,是和非正常退出程序导致mysql sock锁,清除该锁文件后恢复正常. 1 C:\ ...

  5. linux忘记密码-进入单用户模式修改密码

    1.重启系统 重启可以使用命令 reboot.init 6.shutdown -r now 或点击VMware-虚拟机-电源-重新启动客户机 2.进入GRUB界面 重启后,在启动界面按上下方向键选择第 ...

  6. ubuntu测网速speedometer

    下载安装speedometer sudo apt-get install speedometer 查询需要测速的网卡 ifconfig 测速 speedometer -rx enp2s0 执行效果图如 ...

  7. 关于.net core连接数据库字符串加密查询 (DES加密)

    des加密获取的乱码是相对一致的  所以只需要获取到加密乱码在api后台解密就好 1.创建一个控制台用来获取加密后的乱码 using System; using System.Collections. ...

  8. Golang(vs code) 调用其他自定义包解决方法

    初学Golang,昨天遇到一个问题:调用其他自定义包,会出现Gopath或者Goroot路径下找不到. 举个例子: 如图Gee文件夹下的三个.go 文件就是我main.go想调用的. 我有尝试过这种方 ...

  9. slitaz中tazpkg更改软件源

    在tazpkg手册中可以查到保存tazpkg软件源网址的文件,/var/lib/tazpkg/mirror

  10. 性能测试-sysstat工具包(mpstat-主要查看CPU负载与iostat-看数据换入换出以及pidstat-主要看上下文切换)

    1.mpstat概述 mpstat (multiprocessor state) 可以查看所有cpu的平均负载,也可以查看指定cpu的负载.所以mpstat其实就是主要查看CPU负载的一个工具.是一款 ...