mattdesl / canvas-sketch

[beta] A framework for making generative artwork in JavaScript and the browser.
MIT License
4.97k stars 393 forks source link

issue opening sketch-01.js #182

Closed alfred-011 closed 9 months ago

alfred-011 commented 1 year ago
Screenshot 2023-04-09 at 08 58 10
Angusatgithub commented 1 year ago

Also getting the same error - can get it to install all dependancies when using sudo but then vscode seems to have permission issues editing the files created

ReneKrewinkel commented 1 year ago

You need to create a new NodeJS project and add canvas-sketch to it. To do so, open up your terminal, and execute following commands:

mkdir your-dir
cd your-dir
npm init -y
npm install --save-dev canvas-sketch canvas-sketch-util

Now you can create a new sketch within that sub dir:

canvas-sketch index.js --new --open

And if you want to run it later:

canvas-sketch index.js --open

That should do the trick!

alvinometric commented 9 months ago

Thanks René 🙏