canvas-sketch: 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 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated core-js@2.6.11: core-js@❤️ 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
fsevents@1.2.13 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:
gyp
failed 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 registry-js@1.9.0 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:gyp
failed 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! registry-js@1.9.0 install:prebuild-install || node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the registry-js@1.9.0 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
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 44 (3 by maintainers)
For windows users, you need to give windows permission to execute scripts in PowerShell admin mode to install npm and execute all the above threads. Follow this thread stackoverflow You can then create the files in PowerShell e.g (npm install canvas-sketch -cli -g), (canvas-sketch example.js --new --open). Then you can execute (canvas-sketch example.js --open) with git-bash, cmd or PowerShell. Hope this helps.
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:
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.
Hil! Im trying npm install canvas-sketch-cli -g and this happens npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead. 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 source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated 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@❤️.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.added 1 package, changed 671 packages, and audited 673 packages in 7s
57 packages are looking for funding run
npm fund
for details2 high severity vulnerabilities
To address all issues (including breaking changes), run: npm audit fix --force
Run
npm audit
for details.I just tryed all the diferents things that was wrote here. npm install canvas-sketch-cli@1.11.9 --global with this I have the same error.
When I use npm install canvas-sketch -cli -g the message is:npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead.up to date, audited 33 packages in 2s
15 packages are looking for funding run
npm fund
for detailsfound 0 vulnerabilities
And when i do: canvas-sketch --new --open : NOTHING HAPPENDS!!
Im using git bash and PowerShell as admin
@JulienColombo When I helped @soarescamila, we didn’t find the origin of the error, but the problem was that the source file wasn’t being created by the
--new
directive.To bypass this, you can manually create your .js file, for example
hello.js
(https://github.com/mattdesl/canvas-sketch/blob/master/docs/hello-world.md), and then run the commandcanvas-sketch hello.js --open
. This command will start canvas-sketch with thehello.js
file you’ve created and open a browser pointing to the development server onlocalhost:9966
.Thanks, sudo command helped <333
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 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?