vikas5914 / google-photos-backup

Backup photos from Google Photos using Playwright.
MIT License
204 stars 20 forks source link

Error on `node setup.js`: Cannot find package 'playwright-extra' #3

Closed DurvalMenezes closed 12 months ago

DurvalMenezes commented 12 months ago

Following the instructions under "Installation" in README.md, I get this when I try to execute node setup.js as instructed:

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-extra' imported from /usr/local/src/google-photos-backup/google-photos-backup/setup.js
    at new NodeError (internal/errors.js:322:7)
    at packageResolve (internal/modules/esm/resolve.js:732:9)
    at moduleResolve (internal/modules/esm/resolve.js:773:18)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
    at link (internal/modules/esm/module_job.js:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Apologies in advance if I commited any stupid/unrelated mistakes, I have exactly zero experience with node.js and very little experience with Javascript in general.

In case it matters, this is with node v14.21.3 installed from the nodesource.com repo, running on Devuan Chimaera (systemd-less Debian Bullseye equivalent).

vikas5914 commented 12 months ago

@DurvalMenezes Remove node_module and do npm install againa.

DurvalMenezes commented 12 months ago

Thanks for the prompt response and the suggestion.

I tried removing and reinstalling node_module but it did not fix the issue, which remained the same. OTOH in the process of doing that, I was able to gather more information and was finally able to solve the issue with a couple of manual, additional installs:

 npm install playwright-extra
 npm install puppeteer-extra-plugin-stealth
 npm install playwright
 npm install move-file
 npm install exiftool-vendored

After that, I was able to both run node setup.js with no further issues, and continue by following the README.md instructions as-is until the final node index.js which started downloading all my pics.

Thanks again!