canvas-sketch icon indicating copy to clipboard operation
canvas-sketch copied to clipboard

Problem installing

Open FloMastrangelo opened this issue 1 year ago • 2 comments

Hi! I'm on a Mac. I did install node.js v20.11.1, but when I tried to install canvas-sketch globally I couldn't and it says:

npm WARN deprecated [email protected]: 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 553 packages in 26s

83 packages are looking for funding run npm fund for details Flo@MacBook-Air-de-Florencia ~ % npm fund Flo ├── https://opencollective.com/core-js │ └── [email protected], [email protected], [email protected] ├── https://github.com/sponsors/ljharb │ └── [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] ├─┬ https://opencollective.com/babel │ │ └── @babel/[email protected] │ └── https://opencollective.com/browserslist │ └── [email protected], [email protected], [email protected] ├── https://github.com/sponsors/sindresorhus │ └── [email protected], [email protected], [email protected], [email protected] ├── https://github.com/sponsors/isaacs │ └── [email protected] ├── https://github.com/sponsors/feross │ └── [email protected], [email protected], [email protected], [email protected], [email protected] └─┬ https://paulmillr.com/funding/ │ └── [email protected] └── https://github.com/sponsors/jonschlinkert └── [email protected]

I can't get the problem :(

FloMastrangelo avatar Mar 19 '24 18:03 FloMastrangelo

me too!

Eidan78 avatar May 22 '24 20:05 Eidan78

Have you tried using npx to run it locally?

https://github.com/mattdesl/canvas-sketch

npx canvas-sketch-cli blah.js will run it anywhere.

To run it over and over again without installing each time: you can cd into a new folder, type npm init -y && npm install canvas-sketch-cli then you will be able to run npx canvas-sketch blah.js (no -cli this time) which will use the locally installed one.

mattdesl avatar May 22 '24 21:05 mattdesl

This does not run for me on Node v20 either. I installed nvm to install 16 and switched to 16 and it runs fine.

LucasMERN avatar Aug 15 '24 22:08 LucasMERN

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 [email protected] --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 [email protected] sketch.js --new

Or if you are using it with locally installed devDependency:

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

npm install [email protected] --save-dev
npx canvas-sketch sketch.js --new

mattdesl avatar Aug 23 '24 10:08 mattdesl

Whatever you did worked. Working fine on windows with npm. My previous comment about not being able to use it with Nextjs was not valid. I am just bad at coding. haha. I gave up trying to use it with Next. Could not figure out how to get any of the GLSL code to work at all.

LucasMERN avatar Aug 26 '24 20:08 LucasMERN