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 on linux #10

Closed
shardulpathak7 opened this issue May 23, 2020 · 6 comments
Closed

Can't install canvas-sketch-cli on linux #10

shardulpathak7 opened this issue May 23, 2020 · 6 comments

Comments

@shardulpathak7
Copy link

OS ubuntu 18.04
Have no problem install other npm packages
This is the error:
``
sudo npm install canvas-sketch-cli --global
[sudo] password for shardul:
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.
/usr/bin/canvas-sketch -> /usr/lib/node_modules/canvas-sketch-cli/src/index.js
/usr/bin/canvas-sketch-cli -> /usr/lib/node_modules/canvas-sketch-cli/src/index.js
/usr/bin/canvas-sketch-gif -> /usr/lib/node_modules/canvas-sketch-cli/src/ffmpeg-gif.js
/usr/bin/canvas-sketch-mp4 -> /usr/lib/node_modules/canvas-sketch-cli/src/ffmpeg-mp4.js

[email protected] install /usr/lib/node_modules/canvas-sketch-cli/node_modules/registry-js
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 libc= platform=linux)
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Linux 5.3.0-40-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/canvas-sketch-cli/node_modules/registry-js
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
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":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm 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! /home/shardul/.npm/_logs/2020-05-15T18_00_39_802Z-debug.log
``

@MGarrod1
Copy link

I'm also on Ubuntu 18.04 and am getting a similar error. I've tried this both with node V8.1.0 & 12.18.2 and a similar issue seems to occur.

"""
sudo npm install canvas-sketch-cli --global
[sudo] password for matt:
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.
/usr/local/bin/canvas-sketch -> /usr/local/lib/node_modules/canvas-sketch-cli/src/index.js
/usr/local/bin/canvas-sketch-cli -> /usr/local/lib/node_modules/canvas-sketch-cli/src/index.js
/usr/local/bin/canvas-sketch-gif -> /usr/local/lib/node_modules/canvas-sketch-cli/src/ffmpeg-gif.js
/usr/local/bin/canvas-sketch-mp4 -> /usr/local/lib/node_modules/canvas-sketch-cli/src/ffmpeg-mp4.js
npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/2799/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.

[email protected] install /usr/local/lib/node_modules/canvas-sketch-cli/node_modules/registry-js
prebuild-install || node-gyp rebuild

2020/07/14 07:53:52.946041 cmd_run.go:918: WARNING: cannot create user data directory: cannot create "/nonexistent/snap/node/2799": mkdir /nonexistent: permission denied
cannot create user data directory: /nonexistent/snap/node/2799: Permission denied
2020/07/14 07:53:52.975562 cmd_run.go:918: WARNING: cannot create user data directory: cannot create "/nonexistent/snap/node/2799": mkdir /nonexistent: permission denied
cannot create user data directory: /nonexistent/snap/node/2799: Permission denied
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":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm 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! /home/matt/.npm/_logs/2020-07-14T06_53_53_780Z-debug.log
"""

@MGarrod1
Copy link

I've also just tried the local install suggested at: #11

I ran:
cd project_for_local
npm init -y
npm install canvas-sketch-cli --save-dev

And end up with a similar error again:

sudo npm install canvas-sketch-cli --save-dev
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

[email protected] install /home/matt/Dropbox/FrontEndMastersCourses/Creative_Coding/project_for_local/node_modules/registry-js
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=x64 libc= platform=linux)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:167:21)
gyp ERR! System Linux 5.3.0-59-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/matt/Dropbox/FrontEndMastersCourses/Creative_Coding/project_for_local/node_modules/registry-js
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm 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! /home/matt/.npm/_logs/2020-07-14T07_20_15_115Z-debug.log

@mattdesl
Copy link
Owner

Ok, I've finally pinpointed the issue—it has to do with the downloads-folder module which fails to install on some systems. Will see about switching that out with another module that has the same functionality, if possible.

@mattdesl
Copy link
Owner

mattdesl commented Jul 15, 2020

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.

@MGarrod1
Copy link

That seems to have worked for me.

Thanks!

@shardulpathak7
Copy link
Author

It has worked for me.
Thanks!

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

3 participants