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

Unable to install on Ubuntu Mate 20.04 #793

Open
github-userx opened this issue Sep 17, 2022 · 13 comments
Open

Unable to install on Ubuntu Mate 20.04 #793

github-userx opened this issue Sep 17, 2022 · 13 comments

Comments

@github-userx
Copy link

github-userx commented Sep 17, 2022

Describe the bug
Unable to install on Ubuntu mate 20.04.

If fields below will be empty then issue will be Ignored and Closed

To Reproduce
Steps to reproduce the behavior:

  • Ubuntu Mate 20.04
  • NodeJs Version: v10.19.0
mate@mate:~$ sudo npm i -g tiktok-scraper
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request pa
ckage, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circum
stances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
/usr/local/bin/tiktok-scraper -> /usr/local/lib/node_modules/tiktok-scraper/bin/cli.js

[email protected] install /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to
source compile with node-gyp)
node-pre-gyp WARN Hit error ENOENT: no such file or directory, mkdir
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build'
gyp ERR! System Linux 5.4.0-125-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "--fallback-to-build" "--update-binary" "--module=/usr/local/l
ib/node_modules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/usr/local/
lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_vers
ion=0" "--node_napi_label=node-v64"
gyp ERR! cwd /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --update-binary
--module=/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node --module_name=canvas --modul
e_path=/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --nap
i_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.cmd.on (/usr/local/lib/node_modules/tiktok-scraper/node_modules/@mapbox/node-pre-gy
p/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.4.0-125-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/tiktok-scraper/node_modules/.bin/node-pre-gyp" "install"
"--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
node-pre-gyp ERR! node -v v10.19.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --update-binary --module=/usr/local/lib/node_m
odules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/local/lib/node_modu
les/tiktok-scraper/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_l
abel=node-v64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --update-binary
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! /root/.npm/_logs/2022-09-17T18_06_10_086Z-debug.log
mate@mate-optiplex:~$
@palmthree-studio
Copy link

Same problem here on MacOS, any solution ?

@mandys
Copy link

mandys commented Sep 18, 2022

Have seen this issue before.
Had to upgrade to node 12.x for it to work.

@palmthree-studio
Copy link

Have seen this issue before. Had to upgrade to node 12.x for it to work.

I've node 16+, and the problem remains ...

@mandys
Copy link

mandys commented Sep 18, 2022

When I had upgraded to node 14.X it didn’t work for me. It worked only on node 12.x. You can try that or try installing node canvas separately as mostly that causes an issue.

@rajatvermaiam
Copy link

same issue with me..

@arellaTV
Copy link

I think it's because the canvas dependency relies on a version of sharp that is broken in a lot of environments. From what I can tell, it doesn't look like canvas is being used anywhere, so I created a fork with canvas removed from package.json (creative-alchemy@6eff0ea), and it appeared to install successfully after that.

If it's helpful, I can create a PR to suggest removing it.

@shifoc
Copy link

shifoc commented Oct 10, 2022

I have the same issue on node 18.10.0

Edit:
I was able to install it by installing node v16.10.0 LTS

@nxfxcom
Copy link

nxfxcom commented Nov 9, 2022

Same issue in MacOS

1 similar comment
@iaminnasr
Copy link

Same issue in MacOS

@Zabina
Copy link

Zabina commented Jan 9, 2023

Does anyone have a solution for MacOS? Or any alternative scraper to recommend?

@github-userx
Copy link
Author

github-userx commented Jan 9, 2023 via email

@Zabina
Copy link

Zabina commented Jan 9, 2023

@github-userx. I would need a TikTok scraper by hashtag. That would be awesome. Thank you in advance!

@BaGRoS
Copy link

BaGRoS commented Jan 9, 2023

Describe the bug Unable to install on Ubuntu mate 20.04.

If fields below will be empty then issue will be Ignored and Closed

To Reproduce Steps to reproduce the behavior:

  • Ubuntu Mate 20.04
  • NodeJs Version: v10.19.0
mate@mate:~$ sudo npm i -g tiktok-scraper
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request pa
ckage, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circum
stances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
/usr/local/bin/tiktok-scraper -> /usr/local/lib/node_modules/tiktok-scraper/bin/cli.js

[email protected] install /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to
source compile with node-gyp)
node-pre-gyp WARN Hit error ENOENT: no such file or directory, mkdir
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build'
gyp ERR! System Linux 5.4.0-125-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "--fallback-to-build" "--update-binary" "--module=/usr/local/l
ib/node_modules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/usr/local/
lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_vers
ion=0" "--node_napi_label=node-v64"
gyp ERR! cwd /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --update-binary
--module=/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node --module_name=canvas --modul
e_path=/usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --nap
i_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.cmd.on (/usr/local/lib/node_modules/tiktok-scraper/node_modules/@mapbox/node-pre-gy
p/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.4.0-125-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/tiktok-scraper/node_modules/.bin/node-pre-gyp" "install"
"--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/tiktok-scraper/node_modules/canvas
node-pre-gyp ERR! node -v v10.19.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --update-binary --module=/usr/local/lib/node_m
odules/tiktok-scraper/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/local/lib/node_modu
les/tiktok-scraper/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_l
abel=node-v64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --update-binary
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! /root/.npm/_logs/2022-09-17T18_06_10_086Z-debug.log
mate@mate-optiplex:~$

Try:

sudo apt-get update
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

and
sudo npm i -g tiktok-scraper

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

10 participants