KevCui / soaper-dl

:tv: Soaper downloader: download TV series and movies in your terminal
Do What The F*ck You Want To Public License
70 stars 19 forks source link

Parse Error #23

Closed expphoto closed 1 year ago

expphoto commented 2 years ago

Getting a parse error: Invalid numeric literal at line 2, column 14 on Debian.

KevCui commented 2 years ago

Hey @expphoto, could you run the command with the flag -d? It will enable the debug mode and print the additional logs. If you could share the debug logs here, I'll take a quick look.

Keratinxx commented 2 years ago

I've had the same issue, it seems to be an issue with jq parsing the cookie file. and of course i opened it to see what was inside and well...

root@RPI-1:/home/keratin/soap2day-dl# cat cookie.json

    Puppeteer is missing. :-)

    Note: puppeteer is a peer dependency of puppeteer-extra,
    which means you can install your own preferred version.

    - To get the latest stable version run: 'yarn add puppeteer' or 'npm i puppeteer'

    Alternatively:
    - To get puppeteer without the bundled Chromium browser install 'puppeteer-core'

root@RPI-1:/home/keratin/soap2day-dl#

I have already ran the npm installs listed on the github so i tried running what it prompted and i got this issue:


> puppeteer@19.2.2 postinstall /home/keratin/soap2day-dl/bin/node_modules/puppeteer
> node install.js

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'puppeteer/internal/node/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/keratin/soap2day-dl/bin/node_modules/puppeteer/install.js:38:27)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm WARN notsup Unsupported engine for puppeteer@19.2.2: wanted: {"node":">=14.1.0"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer@19.2.2
npm WARN enoent ENOENT: no such file or directory, open '/home/keratin/soap2day-dl/bin/package.json'
npm WARN bin No description
npm WARN bin No repository field.
npm WARN bin No README data
npm WARN bin No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@19.2.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@19.2.2 postinstall 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-11-06T09_15_42_894Z-debug.log

I cant find a fix as of now but maybe you could do something with this information.

Keratinxx commented 2 years ago

EDIT: i got it working again, the issue is puppeteer requiring a higher version of nodejs. i had nodejs 10 and needed at least node 14. i followed this and it got it working pretty easily.

# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
apt-get install -y nodejs
KevCui commented 1 year ago

Hey @expphoto, I'm closing this issue since there is no further debug logs from your side. I assume everything works fine for you now. Feel free to me know if you have further questions.