HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 695 forks source link

Error from libpixman module when running my index.js #148

Closed remzzer closed 2 years ago

remzzer commented 2 years ago

Hello everyone, I am coding along the tuto to make sure I get everything -> https://www.youtube.com/watch?v=3c2EFpCr_vY&list=PL3z8cqoFjfBVtOWo0MSald7lh78ebAyD0&index=9&t=613s

Here is my code:

Capture d’écran 2021-09-15 à 11 41 36

The steps I have done: 1 - npm init 2 - install canvas with npm (version 2.8.0) 3 - node index.js

Then I have this error: _dyld: lazy symbol binding failed: Symbol not found: chkstk_darwin Referenced from: /Users/macbook/Desktop/test/node_modules/canvas/build/Release/libpixman-1.0.40.0.dylib (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: chkstk_darwin Referenced from: /Users/macbook/Desktop/test/nodemodules/canvas/build/Release/libpixman-1.0.40.0.dylib (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib

My Mac config: MacOS High Sierra - Version 10.13.6

I think my Mac version is too old for libpixman-1.0.40.0. If it's the problem, how can I downgrade this package? Which version should I get to make sure the project will still run?

remzzer commented 2 years ago

I will close the issue as I found the solution. My env -> MacOSX 10.13.5.

I needed to downgrade both node and canvas version to run the project.

npm i canvas@2.6.1

Then I install an older version of node (node 8.10.0) with NVM

https://stackoverflow.com/questions/7718313/how-to-change-to-an-older-version-of-node-js

jpaezsa commented 2 years ago

Hello @remzzer Have same problem, which version of node you use?

Are possible to you, explain to me how to downgrade both?

Regards

remzzer commented 2 years ago

@jpaezsa Like I said above -> node 8.10.0

To get the right version I follow these steps: https://stackoverflow.com/questions/7718313/how-to-change-to-an-older-version-of-node-js

jpaezsa commented 2 years ago

Tks @remzzer Rémi I do that!…

Regards!!