当前位置:网站首页>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 !
边栏推荐
- For in and object The difference between keys()
- Elk construction guide
- In navigation, the solution of adding borders to affect the layout
- The advantages of saving pointers when saving objects with vector and the use of reserve
- How to determine the relationship between home page and search? Relationship between homepage and search
- 寻找两个有序数组的中位数(LeetCode 4)
- Neighbor item status update of neighbor subsystem
- LeetCode 1037. 有效的回旋镖(向量叉乘)
- 用cloneNode 克隆,解决id问题/方法 深复制和浅复制修改id的方法
- Who moved my package lock
猜你喜欢
随机推荐
promise的理解已经利用promise实现图片的预加载(顺序加载)
QT添加QObject类(想使用信号和槽)遇到的问题汇总,亲测解决有效error: undefined reference to `vtable for xxxxxx(你的类名)‘
In navigation, the solution of adding borders to affect the layout
Thirty one items that affect the weight of the store. Come and see if you've been hit
屏蔽不显示VS警告warning
作物模型的区域模拟实现过程初探
回溯法, 八皇后
win7注册进程外组件, 服务, 以及COM组件调试
Data processing instructions of arm instruction set
宏编译 预处理头 WIN32_LEAN_AND_MEAN
左右案例+小圆点的轮播图+无时间
Automatic generation of folder directory structure
机器学习之线性模型
树的前序,中序,后序遍历
寻找两个有序数组的中位数(LeetCode 4)
Click to generate 4-bit random number and verify code setting
导航中,添加边框影响布局的解决方法
获取本机所有ipv4, ipv6地址
ARP protocol data processing process of neighbor subsystem
Chapter VI data type (V)








