Comments (7)
Well this seems like a real nightmare.
Automattic/node-canvas#1733 (comment)
https://github.com/Automattic/node-canvas?tab=readme-ov-file#installation
Automattic/node-canvas#2186
The canvas
package is used as a polyfill for running tests in jest-dom which involve <canvas>
elements. Maybe there is a better alternative.
from ml5-next-gen.
Got the same error on a MacBook M1 running 13.5.2 while bringing in the current package.json to update an older branch. Took out the canvas dependency and it seems to be what is causing the issue, maybe a MacOS incompatibility? Examples can still run through yarn start unaffected.
from ml5-next-gen.
I tried a few things in those threads but none seems to work for me. Though someone did mention an alternative that supports both Intel and ARM chips: https://www.npmjs.com/package/@napi-rs/canvas.
from ml5-next-gen.
Ah, I've actually worked quite a bit with node-canvas
and have all the proper dependencies on my machine installed and have no issues running yarn
. I could imagine this being a roadblock for others and I agree it would be good to remove this dependency! I believe I installed the required dependencies with brew
using the command here:
https://github.com/Automattic/node-canvas/wiki/Installation:-Mac-OS-X
@lindapaiste is there a way to temporarily remove the tests that require this and revisit later or will that cause other problems?
from ml5-next-gen.
@shiffman I'll take a look.
from ml5-next-gen.
Without this package we cannot run end-to-end tests where we provide the model with an actual image and check that we got the correct result. So that's a bummer. But....even with this package I was still running into a lot of other problems with using browser code in Node. I think that our long term plan might be that we do certain end-to-end tests in a browser environment instead of trying to polyfill everything. We would use Jest for unit tests of specific logic.
The bodypose tests will fail when removing canvas
. The handpose tests already fail so no loss there. The tests for handleOptions
are fine as that does not involve any image processing.
from ml5-next-gen.
This makes sense to me, @lindapaiste what do you think about pulling out the canvas
tests for now from jest and then incorporating browser-based tests a different way separately?
from ml5-next-gen.
Related Issues (20)
- Another alpha release? HOT 6
- Testing new p5 mirror function HOT 5
- `faceMesh` lips missing `keypoint` 291 HOT 3
- Discussion: `NeuralNetwork`
- README references and examples page? HOT 1
- setBackend() required for ml5.neuralNetwork() bug HOT 4
- ml5 file size HOT 4
- make api compatible with code using legacy library HOT 1
- why pose keypoints x and y positions will misalign the video stream whenever the video size is not (640, 480) HOT 1
- `confidence` vs `score` across all models HOT 2
- Minor errors in documentation.md HOT 1
- Incorporating "flipped" property
- Topology mismatch with 0.20.0.alpha releases HOT 6
- Discussion: ImageClassifier
- What happened to the "skeleton" part of the `bodyPose`? HOT 4
- `bodyPose` bounding box coordinates are in the 0-1 range HOT 1
- CDN for ml5.js release HOT 8
- Error in neuralNetrwork "mouse gesture" example if you click without dragging
- Question about Neural Network normalization HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ml5-next-gen.