mattdesl / canvas-sketch

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

npm ERR! could not determine executable to run #145

Closed chigau-cloud closed 2 years ago

chigau-cloud commented 2 years ago

Installing through npx I get this: npm ERR! could not determine executable to run

and through npm I get this:

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 querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 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.

changed 650 packages, and audited 651 packages in 44s

46 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (3 moderate, 5 high)
fturcheti commented 2 years ago

The output for the global installation is ok, those are just warnings. What's the output for canvas-sketch -v?

chigau-cloud commented 2 years ago

zsh: command not found: canvas-sketch

fturcheti commented 2 years ago

And for these commands: npm config get prefix and echo $PATH?

chigau-cloud commented 2 years ago

/Users/nunoneves/.npm-global

/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/nunoneves/.rvm/bin

fturcheti commented 2 years ago

Try this: export PATH=~/.npm-global/bin:$PATH. Then test canvas-sketch -v again.

chigau-cloud commented 2 years ago

Thank you so much! All sorted!

chigau-cloud commented 2 years ago

Actually, this solution is not permanent, once I close the terminal I need to reinstall canvas-sketch through use of xport PATH=~/.npm-global/bin:$PATH

fturcheti commented 2 years ago

You should add this export PATH=~/.npm-global/bin:$PATH to your shell config file to make it permanent. It seems that you're using Zsh, so this config should be on your ~/.zshrc.

You can open your .zshrc file in your text editor and make this change or you can use this command to append the given text to your config file:

echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
mattdesl commented 2 years ago

Please see this comment about installation, if errors persist let me know.

https://github.com/mattdesl/canvas-sketch/issues/96#issuecomment-1231548822

Closing this for now.