diff --git a/docs/source/how_to/01_authentication_how_to.md b/docs/source/how_to/01_authentication_how_to.md index 60f237a..96ae249 100644 --- a/docs/source/how_to/01_authentication_how_to.md +++ b/docs/source/how_to/01_authentication_how_to.md @@ -143,7 +143,7 @@ generic_extractor: **PyPi/ Local**: -When using the Auto Archiver PyPI package, or running locally, you will need additional system requirements to run the token generation script, namely either Docker, or Node.js and Yarn. +When using the Auto Archiver PyPI package, or running locally, you will need additional system requirements to run the token generation script, namely either Docker, or Node.js and npm (>=9). See the [bgutil-ytdlp-pot-provider](https://github.com/Brainicism/bgutil-ytdlp-pot-provider?tab=readme-ov-file#a-http-server-option) documentation for more details. diff --git a/src/auto_archiver/modules/generic_extractor/generic_extractor.py b/src/auto_archiver/modules/generic_extractor/generic_extractor.py index b60132e..dad75f7 100644 --- a/src/auto_archiver/modules/generic_extractor/generic_extractor.py +++ b/src/auto_archiver/modules/generic_extractor/generic_extractor.py @@ -109,7 +109,7 @@ class GenericExtractor(Extractor): def setup_token_generation_script(self) -> None: """This function sets up the Proof of Origin Token generation script method for bgutil-ytdlp-pot-provider if enabled or in Docker.""" - missing_tools = [tool for tool in ("node", "yarn", "npx") if shutil.which(tool) is None] + missing_tools = [tool for tool in ("node", "npm", "npx") if shutil.which(tool) is None] if missing_tools: logger.error( f"Cannot set up PO Token script; missing required tools: {', '.join(missing_tools)}. " @@ -151,7 +151,7 @@ class GenericExtractor(Extractor): shutil.move(os.path.join(extracted_root, "server"), server_dir) shutil.rmtree(extracted_root) logger.info("Installing dependencies and transpiling PoT Generator script...") - subprocess.run(["yarn", "install", "--frozen-lockfile"], cwd=server_dir, check=True) + subprocess.run(["npm", "ci"], cwd=server_dir, check=True) subprocess.run(["npx", "tsc"], cwd=server_dir, check=True) with open(version_file, "w") as vf: