canvas-sketch
canvas-sketch copied to clipboard
Install canvas-sketch-cli errors
Hello,
I'm trying to download canvas-sketch-cli using: npm install canvas-sketch-cli --global, but it's not working. My node is up to date, my npm is up to date, but when I get as far as trying to install canvas-sketch-cli it just hits a LOT of errors:
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. ^[[A⸨ ░░░░░░░░░░░░░░░⸩ ⠸ fetchMetadata: sill resolveWithNewModule crypto-rando/Users/jordanbelmont/.npm-packages/bin/canvas-sketch -> /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/src/index.js /Users/jordanbelmont/.npm-packages/bin/canvas-sketch-gif -> /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/src/ffmpeg-gif.js /Users/jordanbelmont/.npm-packages/bin/canvas-sketch-mp4 -> /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/src/ffmpeg-mp4.js /Users/jordanbelmont/.npm-packages/bin/canvas-sketch-cli -> /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/src/index.js
[email protected] install /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/node_modules/fsevents node install.js No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error:
gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:321:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 19.2.0 gyp ERR! command "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/node_modules/fsevents gyp ERR! node -v v13.7.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok [email protected] install /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/node_modules/registry-js prebuild-install || node-gyp rebuild ^[[Aprebuild-install WARN install No prebuilt binaries found (target=13.7.0 runtime=node arch=x64 libc= platform=darwin) No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error:gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:321:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 19.2.0 gyp ERR! command "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/jordanbelmont/.npm-packages/lib/node_modules/canvas-sketch-cli/node_modules/registry-js gyp ERR! node -v v13.7.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install:prebuild-install || node-gyp rebuildnpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/jordanbelmont/.npm/_logs/2020-05-17T21_57_40_600Z-debug.log
I understand the workaround for this is to enter the following -
npm config set prefix '~/.npm-packages' export PATH="$PATH:$HOME/.npm-packages/bin"
However, I've done this - still no dice. Sidenote: I'm not particularly savvy with Command Line
Thanks
Hey there,
It looks as though you may need to install the xcode tooling for some of the node features needed by canvas-sketch:
gyp: No Xcode or CLT version detected!
This may be useful?
I'd start with xcode-select --install, then if you're getting errors about it already being installed, you can follow the steps in that Medium post.
I'm getting the almost same error as mentioned above , I have already tried to re-install gyp package
`npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Admin\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\object-copy\node_modules' npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Users\Admin\AppData\Roaming\npm\node_modules\canvas-sketch-cli\node_modules\tar-stream\node_modules' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\canvas-sketch-cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code EEXIST npm ERR! path C:\Users\Admin\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\index.js npm ERR! dest C:\Users\Admin\AppData\Roaming\npm\canvas-sketch npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Admin\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\index.js' -> 'C:\Users\Admin\AppData\Roaming\npm\canvas-sketch' npm ERR! File exists: C:\Users\Admin\AppData\Roaming\npm\canvas-sketch npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly.`
I tried installing canvas-sketch-cli using the command npm install canvas-sketch-cli -g on windows but the whenever I use the command 'canvas-sketch-cli' it says that command is not recognized. Any help?
It does not work on Linux mint either both times I was using node 8+ and mom 5+
@ryzbaka I believe the name that's added to path is canvas-sketch and not canvas-sketch-cli: https://github.com/mattdesl/canvas-sketch#quick-start-with-nodejs--npm
@kellymilligan running canvas-sketch doesn't work either. It says:
C:\Users\hamza>npm install canvas-sketch-cli -g npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. C:\Users\hamza\AppData\Roaming\npm\canvas-sketch-gif -> C:\Users\hamza\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\ffmpeg-gif.js C:\Users\hamza\AppData\Roaming\npm\canvas-sketch -> C:\Users\hamza\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\index.js C:\Users\hamza\AppData\Roaming\npm\canvas-sketch-cli -> C:\Users\hamza\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\index.js C:\Users\hamza\AppData\Roaming\npm\canvas-sketch-mp4 -> C:\Users\hamza\AppData\Roaming\npm\node_modules\canvas-sketch-cli\src\ffmpeg-mp4.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\canvas-sketch-cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
- [email protected] updated 22 packages in 83.074s
C:\Users\hamza>mkdir my-sketches
C:\Users\hamza>cd my-sketches
C:\Users\hamza\my-sketches>canvas-sketch sketch.js --new --open 'canvas-sketch' is not recognized as an internal or external command, operable program or batch file.
These are the versions btw
C:\Users\hamza\my-sketches>node -v v12.15.0
C:\Users\hamza\my-sketches>npm -v 6.13.0
Thanks for testing, I'm still not exactly sure what's going on but will to try to look into this in the coming days.
I fixed it on Linux by simply updating my npm to the latest version, the issue still persists on Windows.
Hi all, finally found the problem, it had to do with finding the "Downloads" folder on some systems. Should be sorted in v1.11.9, if you could try to reinstall it globally (or locally if you're using it that way) like so:
npm install [email protected] --global
If any users are running into problems with the automatic Downloads folder resolution, you may want to set an environment variable, see here.
Please let me know if that fixes it for you.
Hey there,
I'm getting the same error on Windows when I tried to install with the command line npm install canvas-sketch-cli -g
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: 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.
Npm is at version 7.20.0 and Node.js is at v14.17.1.
I ran the command npm install [email protected] --global but the issue still persists.
Thank you for any help. PS: I'm a beginner with command line, if I lost some information let me know.
Have you tried to run canvas-sketch after that, @soarescamila? Because those are just warnings, so canvas-sketch may be working anyway.
Hello @fturcheti! Yes, I did the same steps as in the tutorial. I tried to run canvas-sketch --new --open but nothing happened
When you ran canvas-sketch --new --open, no message was returned?
No message. Nothing :/
I have a problem on downloding Canvas sketch.These mesages occur :((
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: 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. npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' 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/sofinaydenova/.npm/_logs/2021-09-09T14_02_03_143Z-debug.log (base) Sofis-MacBook-Pro:~ sofinaydenova$
@sofinaydenova Here are a couple of things you can try: https://stackoverflow.com/a/55172709 https://flaviocopes.com/npm-fix-missing-write-access-error/
I had the same problems ( linux user) , and I was able to fix it by updating NPM Here is the link to the page with which I was guided: https://www.geeksforgeeks.org/how-to-update-npm/
just in case do it as root
sudo -s
Method 1:
npm update -g
Method 2:
npm install npm@latest -g
Method 3:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
Method 4:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Method 5:
npm install -g npm@next
I used the Method 2 and 4, and it worked for me!
Thanks, sudo command helped <333
No message. Nothing :/
@soarescamila Hi, did you solve this problem? I'm just struggling with the same one
found the error
npm install canvas-sketch-cli -g
sketch -cli is together...
this one bellow may work,
i still doesnt understand how to use but i already can open the server...
npm install canvas-sketch -cli -g
Hello..i was wondering if someone can help me with this problem... when i type canvas-sketch sketch-01.js --new the output is command not found:canvas-sketch i dont know what seems to be the problem...
@justEliada If you're getting a command not found, the cli is not properly installed.
Have you ran npm install canvas-sketch-cli -g before invoking canvas-sketch? Did the installation process ended successfully or did you get error messages?
@fturcheti
Hello, thank you for replying.
I did have errors at installing the npm so i searched for another link online and i found this https://www.npmjs.com/package/canvas-sketch-cli?activeTab=versions
which worked for me since i was able to install it and all steps were fine expect for when i used this canvas-sketch
@justEliada What's the output when you the command canvas-sketch -v?
@fturcheti command not found: canvas-sketch This is the output everytime. I’ve been dealing with this problem the past hours and i cant seem to fix it
@justEliada If you're getting a command not found, the cli is not properly installed, or it is not in your path.
Can you run npm install canvas-sketch-cli -g and copy the output here?
Also, do you have another cli intalled with npm install that's working properly on your machine?
@fturcheti This is the output i get when i try to instal the cli...this is the first time I'm installing one so besides that one (whose link i sent)that i tried today i don't have any others installed
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.
Hey @justEliada, check out this section in the canvas-sketch Troubleshooting guide: https://github.com/mattdesl/canvas-sketch/blob/master/docs/troubleshooting.md#fixing-eaccess-error-on-npm-install--g
The quick but not ideal solution is to add sudo in front of the install command, as globally installing requires root level permissions within the filesystem: sudo npm install canvas-sketch-cli -g
@kellymilligan I just tried it and it works like a charm. Thank you so so much. I really appreciate it :)
When you ran
canvas-sketch --new --open, no message was returned?
hi, did anyone fix this problem? I've the same :/