Closed Sandeepchhetri7 closed 2 years ago
What did you do to get to this error? What have you tried in order to solve this? What node version are you on?
same here.
npm install canvas-sketch-cli -g (after use this command i get: C:\Windows\system32>npm install canvas-sketch-cli -g npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
changed 645 packages, and audited 646 packages in 35s
45 packages are looking for funding
run npm fund
for details
20 vulnerabilities (3 moderate, 17 high)
@Sandeepchhetri7 @bravepxl These messages are just warnings, not errors.
What output do you get when running the command canvas-sketch -v
?
I had sucess installing but I don't know how to use it opened the server but zero idea how to edit in real time refreshing. I'll keep using the p5.js web editor more simple to use...
Hi,
When I install canvas-sketch in the terminal (mac) at the end of the process I get this message (like @Sandeepchhetri7 @bravepxl )
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
changed 649 packages, and audited 650 packages in 37s
45 packages are looking for funding run
npm fund
for details20 vulnerabilities (3 moderate, 17 high)
To address issues that do not require attention, run: npm audit fix
To address all issues (including breaking changes), run: npm audit fix --force
Then, to reply to @fturcheti, I put "canvas-sketch -v" and this was the message I got:
zsh: command not found: canvas-sketch
Can someone help me to solve this?
Thank you in advance
@LE-DSG What's the output of echo $PATH
?
@LE-DSG What's the output of
echo $PATH
?
hello, thank you for answering
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
@LE-DSG Ok. And what's the output of ls /usr/local/bin | grep "canvas-sketch"
?
@LE-DSG Ok. And what's the output of
ls /usr/local/bin | grep "canvas-sketch"
?
When I execute the line you indicated, it does not print anything.
I'll see how I solve, I'm ashamed to bother you.
Thanks,
Luis
@LE-DSG The problem is that your node modules installed globally are not being linked to /usr/local/bin
, so they're not available in your path. Then the command canvas-sketch
can't be found.
You can try to fix it by running this command: npm config set prefix /usr/local
. If this works, it'll fix the global problem with your npm installations, so you should try this first.
But for the canvas-sketch installation in specific, you can bypass this issue with a local installation, like explained here: https://github.com/mattdesl/canvas-sketch/blob/master/docs/installation.md#installing-the-cli-locally
npm config set prefix /usr/local
OK. I will give it a try. Thank you very much for everything.
Hi, I had the same issue on Ubuntu 21.10 - when node.js was installed via Ubuntu Software - snap. There were some crazy permission issues. I found a quick workaround by installing nodejs and npm through the terminal via apt install - no idea if this helps anyone here.
The previous issue in my case was the following: It created the symlinks in usr/local/bin correctly but they were broken to - usr/local/lib/ <- nothing in there :/ Thanks!
Also having trouble with installation.
Using Terminal w:
When I type:
npm install canvas-sketch-cil -g
it says:
npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/canvas-sketch-cli npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/canvas-sketch-cli' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/canvas-sketch-cli'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/canvas-sketch-cli' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
New to using Terminal, so help is much appreciated.
Same here.
Hi @misreadings @selmunniaaa if you have EACCES error, it is most likely a problem with permissions in the way npm is set up. I just set up a new laptop and had the same problem; it seems npm doesn't have global access on some systems with the default installation.
Two options:
-g
or --global
to install, you can run the commands inside a new folder, and install everything locally. I've included some details below.If you want to install locally, start with a new folder (or move into the folder you want to keep your project inside of):
mkdir genart-sketches
cd genart-sketches
# run this to generate a package.json file
npm init -y
# install API locally
npm install canvas-sketch --save
# install CLI locally as a devDependency
npm install canvas-sketch-cli --save-dev
Once you do that, you can run the following command from inside that project folder to force the local version, notice npx
:
npx canvas-sketch src/sketch.js --new --open
Thanks, @mattdesl! Worked like a charm.
hi @mattdesl !
I had problem with installing Canvas-sketches, I'm new to all these so i might need more details if possible. Thank you for your time! Appreciated! I tried to follow some instructions that you replied to other users, but it seems I got it all confused now.
Allies-MacBook-Pro:~ allieyo$ node -v v16.14.0 Allies-MacBook-Pro:~ allieyo$ npm -v 8.3.1 Allies-MacBook-Pro:~ allieyo$ npm install canvas-sketch-cli -g npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/canvas-sketch-cli npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/canvas-sketch-cli' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/canvas-sketch-cli'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/canvas-sketch-cli' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/allieyo/.npm/_logs/2022-02-27T15_58_53_277Z-debug-0.log Allies-MacBook-Pro:~ allieyo$ clear
Allies-MacBook-Pro:~ allieyo$ cd genart-sketches -bash: cd: genart-sketches: No such file or directory Allies-MacBook-Pro:~ allieyo$ cd genart-sketches -bash: cd: genart-sketches: No such file or directory Allies-MacBook-Pro:~ allieyo$ cd Genart-sketches -bash: cd: Genart-sketches: No such file or directory Allies-MacBook-Pro:~ allieyo$ cd Documents/Genart-sketches Allies-MacBook-Pro:Genart-sketches allieyo$ npm init -y Wrote to /Users/allieyo/Documents/Genart-sketches/package.json:
{ "name": "genart-sketches", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" }
Allies-MacBook-Pro:Genart-sketches allieyo$ npm install canvas-sketch --save
added 28 packages, and audited 29 packages in 9s
11 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities Allies-MacBook-Pro:Genart-sketches allieyo$ npm install canvas-sketch-cli --save-dev npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js.
added 630 packages, and audited 659 packages in 54s
47 packages are looking for funding
run npm fund
for details
9 vulnerabilities (3 moderate, 6 high)
Some issues need review, and may require choosing a different dependency.
Run npm audit
for details.
Allies-MacBook-Pro:Genart-sketches allieyo$ npx canvas-sketch src/sketch.js --new --open
→ Writing file: src/sketch.js
[0001] info Server running at http://192.168.1.8:9966/ (connect) [0001] info LiveReload running [0002] 19ms 0B GET 200 / (generated) [0002] 858ms 259KB (browserify) [0002] 423ms 0B GET 200 /sketch.js (middleware)
I'm having the exact same problem... Have you found the way around it?
Hi, I am not able to install I got number of issues. I need help.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN sketches@1.0.0 No description npm WARN sketches@1.0.0 No repository field.