omkarcloud/amazon-scraper

Installation failing

Closed this issue · 1 comments

this error is encountered when trying to run the main.py file

(.venv) PS C:\Users\nubonix\PycharmProjects\a\Amazon\amazon-scraper> py .\main.py
☕  JavaScript Error  Call to 'require' failed:
> from src import Amazon
  at <module> (C:\Users\nubonix\PycharmProjects\a\Amazon\amazon-scraper\main.py:1)
> from .amazon_scraper import Amazon
  at <module> (C:\Users\nubonix\PycharmProjects\a\Amazon\amazon-scraper\src\__init__.py:1)
> from botasaurus import bt
  at <module> (C:\Users\nubonix\PycharmProjects\a\Amazon\amazon-scraper\src\amazon_scraper.py:2)
> from .decorators import RetryException,browser, request, AsyncQueueResult, AsyncResult
  at <module> (C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\botasaurus\__init__.py:1)
> from .creators import create_requests
  at <module> (C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\botasaurus\decorators.py:39)
> from .anti_detect_requests import AntiDetectRequests
  at <module> (C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\botasaurus\creators.py:4)
> from .got_adapter import GotAdapter
  at <module> (C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\botasaurus\anti_detect_requests.py:5)
> got = require("got-scraping-export")
  at <module> (C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\botasaurus\got_adapter.py:15)
>

... across the bridge ...

  at importModuleDynamicallyCallback (node:internal/modules/esm/utils:207:14)
  at importModuleDynamicallyWrapper (node:internal/vm/module:431:21)
  at importModuleDynamically (node:internal/modules/cjs/loader:1261:33)
  at ModuleLoader.import (node:internal/modules/esm/loader:328:34)
  at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
  at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
  at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
  at defaultResolve (node:internal/modules/esm/resolve:1130:11)
  at moduleResolve (node:internal/modules/esm/resolve:910:20)
  at packageResolve (node:internal/modules/esm/resolve:853:9)
  Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'got-scraping-export' imported from C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\javascript\js\deps.js
> ^
🌉 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'got-scraping-export' imported from C:\Users\nubonix\PycharmProjects\a\.venv\Lib\site-packages\javascript\js\deps.js

a command from the installation may be missing

npm install got-scraping

however, this command fails and I am using an admin powershell to run both of these commands

(.venv) PS C:\Users\nubonix\PycharmProjects\a\Amazon\amazon-scraper> npm install got-scraping
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! FetchError: request to https://registry.npmjs.org/got-scraping failed, reason:
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:518:28)
npm ERR!     at _destroy (node:_http_client:875:13)
npm ERR!     at onSocketNT (node:_http_client:895:5)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR!  FetchError: request to https://registry.npmjs.org/got-scraping failed, reason:
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:518:28)
npm ERR!     at _destroy (node:_http_client:875:13)
npm ERR!     at onSocketNT (node:_http_client:895:5)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR!   code: 'EACCES',
npm ERR!   errno: 'EACCES',
npm ERR!   type: 'system',
npm ERR!   requiredBy: '.'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Resolved