mattdesl / canvas-sketch

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

issue in installing canvas-sketch #201

Open Ayush0219 opened 3 months ago

Ayush0219 commented 3 months ago

canvas-sketch is not installing.it shows following error!:

C:\Users\Ayush>npm install canvas-sketch-cli -g npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

changed 552 packages in 30s

83 packages are looking for funding run npm fund for details

mattdesl commented 3 months ago

Can you run canvas-sketch command after installation?

the logs you’ve pasted there are just warnings

scream818 commented 3 months ago

running the commands is giving the following error right after installation:

Error: spawn EINVAL at ChildProcess.spawn (node:internal/child_process:421:11) at spawn (node:child_process:761:9) at command (C:\Users\C\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\spawn-npm-install\index.js:45:14) at Array. (C:\Users\C\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\install-if-needed\index.js:47:9) at runSeries (C:\Users\C\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\run-series\index.js:23:33) at run (C:\Users\C\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\install-if-needed\index.js:52:5) at C:\Users\C\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\read-closest-package\index.js:29:7

Dellangelo-graphic commented 2 months ago

I've got the same problem

6abotage commented 2 months ago

It's working with node 16, with >=18 it's not working

Dellangelo-graphic commented 2 months ago

Thank you so much! It finally works!!

mattdesl commented 1 month ago

I've just changed a feature that may help even when node version is >= 18. Unfortunately I don't have access to Windows right now.

Can you try updating the CLI?

If you are using it globally:

npm i canvas-sketch-cli@1.15.0 --global

mkdir test-sketch
cd test-sketch
canvas-sketch sketch.js --new

Or if you are using it with npx:

mkdir test-sketch
cd test-sketch
npx canvas-sketch-cli@1.15.0 sketch.js --new

Or if you are using it with locally installed devDependency:

mkdir test-sketch
cd test-sketch
npm init -y

npm install canvas-sketch-cli@1.15.0 --save-dev
npx canvas-sketch sketch.js --new