Fixing canvas package install
Mick F

Mick F @dirtyhenry

Location:
Rennes, France
Joined:
May 13, 2025

Fixing canvas package install

Publish Date: May 14 '25
0 0

After a clean macOS reinstall, running a web project using the canvas package (via react-pdf) failed with the following error:

Cannot find module '../build/Release/canvas.node'
Enter fullscreen mode Exit fullscreen mode

Many occurrences online suggested that fixing this only required to reinstall the package but it turns out that in my case, a Python library was missing:

ModuleNotFoundError: No module named 'distutils'
Enter fullscreen mode Exit fullscreen mode

It turns out what fixed the error was:

pip install setuptools
Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment