Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install canvas-sketch-cli #11

Open
loreerol opened this issue May 24, 2020 · 15 comments
Open

Can't install canvas-sketch-cli #11

loreerol opened this issue May 24, 2020 · 15 comments

Comments

@loreerol
Copy link

Hello,
I am having some difficulty installing canvas-sketch-cli. I've pasted the stack trace below:

`➜ npm install canvas-sketch-cli --global
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@<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.
/Users/lhill/.nvm/versions/node/v8.16.2/bin/canvas-sketch -> /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/src/index.js
/Users/lhill/.nvm/versions/node/v8.16.2/bin/canvas-sketch-cli -> /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/src/index.js
/Users/lhill/.nvm/versions/node/v8.16.2/bin/canvas-sketch-gif -> /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/src/ffmpeg-gif.js
/Users/lhill/.nvm/versions/node/v8.16.2/bin/canvas-sketch-mp4 -> /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/src/ffmpeg-mp4.js

fsevents@1.2.13 install /Users/lhill/.nvm/versions/node/v8.16.2/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 (/Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/lhill/.nvm/versions/node/v8.16.2/bin/node" "/Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/node_modules/fsevents
gyp ERR! node -v v8.16.2
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok

registry-js@1.9.0 install /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/node_modules/registry-js
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=8.16.2 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 (/Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/lhill/.nvm/versions/node/v8.16.2/bin/node" "/Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lhill/.nvm/versions/node/v8.16.2/lib/node_modules/canvas-sketch-cli/node_modules/registry-js
gyp ERR! node -v v8.16.2
gyp ERR! node-gyp -v v5.0.7
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/lhill/.npm/_logs/2020-05-24T12_51_41_583Z-debug.log`

The log itself is quite long, 11110 lines, but at the end there was this error

11104 16957 error code ELIFECYCLE 11105 16958 error errno 1 11106 16959 error registry-js@1.9.0 install: prebuild-install || node-gyp rebuild 11107 16959 error Exit status 1 11108 16960 error Failed at the registry-js@1.9.0 install script. 11109 16960 error This is probably not a problem with npm. There is likely additional logging output above. 11110 16961 verbose exit [ 1, true ]

@1Marc
Copy link
Collaborator

1Marc commented Jun 1, 2020

What version of Node.js are you on? You may want to consider updating Node/npm on your system and then trying the install again. I was able to install just fine on Node 13.x.

@loreerol
Copy link
Author

loreerol commented Jun 1, 2020

I was on Node version 8.16.2, I've just upgraded to 12.16.0 and have not tried again but I will as soon as I can.

@loreerol
Copy link
Author

loreerol commented Jun 1, 2020

With node version 12.16.0 I have tried to reinstall with npm install canvas-sketch-cli --global and I still get the same issue. I on on a mac.

@loreerol
Copy link
Author

loreerol commented Jun 1, 2020

I just upgraded to 14.3.0 and it still gives me the exact same error

@mattdesl
Copy link
Owner

mattdesl commented Jun 1, 2020

That's a bit odd — canvas-sketch-cli doesn't include the registry-js module in its direct or indirect dependencies according to the lockfile. You could try:

npm uninstall registry-js --global
npm install canvas-sketch-cli --global

You could also try installing it just locally for now:

# go into a folder
cd my-cool-project

# create a package.json
npm init -y

# install locally
npm install canvas-sketch-cli --save-dev

Once its installed locally, you can run the locally-installed version by prefixing your command with npx, like so:

npx canvas-sketch sketch.js --new --open

If that doesn't work, please let me know your macOS version.

@loreerol
Copy link
Author

loreerol commented Jun 1, 2020

I'm on macOS Catalina Version 10.15.4
I ran:
npm uninstall registry-js --global npm install canvas-sketch-cli --global

and got the same error as before :/

I am also getting the same error when I run:
npm init -y npm install canvas-sketch-cli --save-dev

When I try and run npx canvas-sketch sketch.js --new --open

I get:
➜ npx canvas-sketch sketch.js --new --open npx: installed 35 in 8.702s command not found: canvas-sketch

I really hope I can get this working, I am really looking forward to this course. Thank you for the assistance so far!

@loreerol
Copy link
Author

loreerol commented Jun 1, 2020

Here is the error one more time in case something has changed that I am missing:

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@<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.

fsevents@1.2.13 install /Users/lhill/Documents/workshop-generative-art/genart/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 (/Users/lhill/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/lhill/.nvm/versions/node/v14.3.0/bin/node" "/Users/lhill/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lhill/Documents/workshop-generative-art/genart/node_modules/fsevents
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

registry-js@1.9.0 install /Users/lhill/Documents/workshop-generative-art/genart/node_modules/registry-js
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=14.3.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 (/Users/lhill/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/lhill/.nvm/versions/node/v14.3.0/bin/node" "/Users/lhill/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lhill/Documents/workshop-generative-art/genart/node_modules/registry-js
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN genart@1.0.0 No description
npm WARN genart@1.0.0 No repository field.

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/lhill/.npm/_logs/2020-06-01T21_37_36_726Z-debug.log

@psychicDivine
Copy link

im also getting the same error on Windows .

@pablopfernandez
Copy link

pablopfernandez commented Sep 26, 2021

Hi! I'm trying to run canvas-sketch but it returns "command not found" (I'm using MacOs Big Sur 11.5.2). I've tried the solution Matt provides above and other ones I found online: changing PATH, removing the "-bash" on the Shell tab from Terminal config. Any other ideas? Thanks!

UPDATE: I was able to solve this. I installed it using SUDO instead and worked fine.

@michaelhardie63
Copy link

michaelhardie63 commented Sep 28, 2021

Hi! I'm trying to run canvas-sketch but it returns "command not found" (I'm using MacOs Big Sur 11.5.2). I've tried the solution Matt provides above and other ones I found online: changing PATH, removing the "-bash" on the Shell tab from Terminal config. Any other ideas? Thanks!

UPDATE: I was able to solve this. I installed it using SUDO instead and worked fine.

Hi there, I have been having the same issues and was wondering if you could share the terminal input fix you used?

Thanks in advance

@pablopfernandez
Copy link

Sure! I used this:
sudo npm i canvas-sketch-cli -g
And it added a lot of packages that weren´t install before. I hope this works for you too. Regards!

@michaelhardie63
Copy link

Sure! I used this:
sudo npm i canvas-sketch-cli -g
And it added a lot of packages that weren´t install before. I hope this works for you too. Regards!

Thanks! Unfortunately this is still not working for me.

i'll have to find some other work around for it. Thanks again

@michaelhardie63
Copy link

UPDATE: This will work if it's done locally for me. but installing it globally is an issue

@vgaze
Copy link

vgaze commented Jul 20, 2022

this worked for me (MacBook Pro/monterey) thanks!!

Sure! I used this:
sudo npm i canvas-sketch-cli -g
And it added a lot of packages that weren´t install before. I hope this works for you too. Regards!

@lauraoprisan
Copy link

I managed to install it locally, but if I run this command in git: "npx canvas-sketch sketch.js --new --open". It doesn't do anything. Git doesn't return anything. Can somebody help me, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants