当前位置:网站首页>Problems encountered in installing canvas and errors encountered in running the project
Problems encountered in installing canvas and errors encountered in running the project
2022-06-12 12:10:00 【On procedural retreat】
1.mac Installation problems
1) The first step is to use brew install :brew install pkg-config cairo pango libpng jpeg giflib librsvg
If the above command is installed incorrectly , It can be installed separately ( recommend )
brew install pkg-config
brew install cairo
brew install pango
brew install libpng
brew install jpeg
brew install giflib
brew install librsvg
For details, please refer to the official website :
GitHub - Automattic/node-canvas: Node canvas is a Cairo backed Canvas implementation for NodeJS.Node canvas is a Cairo backed Canvas implementation for NodeJS. - GitHub - Automattic/node-canvas: Node canvas is a Cairo backed Canvas implementation for NodeJS.
https://github.com/Automattic/node-canvashttps://github.com/Automattic/node-canvas/wiki/
https://github.com/Automattic/node-canvas/wiki/ After installation , You can use commands :brew list Check to see if they are all installed
2) The second step is to install canvas
npm instal canvas
After installation , Use command :npm list Check to see if... Is installed canvas
2. An error is reported in the operation item :
Error: Cannot find module '/Users/ymxx/xx/xx/xx/node_modules/canvas'
Solution :
Will be installed canvas( Location :usr/local/lib/node_modules/node-canvas) Copy to the project -node_modules below , And changed his name to canvas( The name is the same as in the project )
3. Operation item error report II :
Error: Cannot find module '../build/Release/canvas.node'
Solution :
Open the terminal in the current project
Execute first :npm uninstall canvas
Install again :npm i canvas
After installation, use the command :npm list Check whether it has been successfully installed in this project
Finally, reinitialize :yarn install
Project started successfully !
边栏推荐
- Reasons for SSL introduction and encryption steps
- LeetCode 1037. 有效的回旋镖(向量叉乘)
- For in and object The difference between keys()
- 什么是模块化?模块化的好处
- 创建Servlet项目
- What is modularity? Benefits of modularity
- Difference between Definition and Declaration
- Promise understanding has used promise to realize picture preloading (sequential loading)
- 作物模型的区域模拟实现过程初探
- object. Defineproperty basic usage
猜你喜欢

Ros- resolve error "tf2\u buffer\was not declared in this scope"

QML first day

TinyMCE series (I) TinyMCE environment construction

创建Servlet项目

In navigation, the solution of adding borders to affect the layout

QT添加QObject类(想使用信号和槽)遇到的问题汇总,亲测解决有效error: undefined reference to `vtable for xxxxxx(你的类名)‘

Elk construction guide

UML series articles (31) architecture modeling - deployment diagram

DOM+JS+轮播图+无时间

开源项目-(ERP+酒店+电商)后台管理系统
随机推荐
How to operate the newly revised Taobao merchants and what should be paid attention to
The second regular match is inconsistent with the first one, and the match in the regular loop is invalid
Batch load/store instructions of arm instruction set
鸡尾酒排序
屏蔽不显示VS警告warning
LeetCode 890. 查找和替换模式(模拟+双哈希表)
Autolock solves the problem of forgetting to unlock after locking
宏编译 预处理头 WIN32_LEAN_AND_MEAN
MySQL review
恭喜Splashtop 荣获2022年 IT Europa “年度垂直应用解决方案”奖
Rich text editor copying pictures in word documents
Jump instruction of arm instruction set
mysql复习
Common debugging tools and commands for ROS
Click to generate 4-bit random number and verify code setting
[译] Go语言测试进阶版建议与技巧
Pseudo instruction of arm instruction set
机器学习之线性模型
Conversion between ROS map picture pixels and map coordinate system coordinates
Channel Shuffle类