[GH-ISSUE #898] Suggestion: Fixing issue #805 #2068

Closed
opened 2026-03-01 17:56:13 +03:00 by kerem · 1 comment
Owner

Originally created by @Ahmedazim7804 on GitHub (Nov 28, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/898

As written in issue #805 in windows, archivebox fails to install node_modules SINGLEFILE_BINARY, READABILITY_BINARY, MERCURY_BINARY.
although it can fixed by adding kwargs['shell'] = True to "run" function in "system.py" for Popen command.
and commenting the pgid = os.getpgid(process.pid) line as in windows os module does not have getpgid function, i know it will break code later in case of exception.
and adding shell=True parameter to run_shell([ 'npm', 'install', '--prefix', str(out_dir), '--force', '--no-save', '--no-audit', '--no-fund', '--loglevel', 'error', ], capture_output=False, cwd=out_dir) in if USE_NODE: code block in setup() function in main.py.

After these changes archivebox installed modules fine but still was not recognizing them and was installing them on every archivebox setup command, it is because the SINGLEFILE_BINARY and READABILITY_BINARY have .cmd extension on windows.
it could be fixed by replacing 'SINGLEFILE_BINARY': {'type': str, 'default': lambda c: bin_path('single-file')}, 'READABILITY_BINARY': {'type': str, 'default': lambda c: bin_path('readability-extractor')}, to 'SINGLEFILE_BINARY': {'type': str, 'default': lambda c: bin_path('single-file.cmd')}, 'READABILITY_BINARY': {'type': str, 'default': lambda c: bin_path('readability-extractor.cmd')}, in DEPENDENCY_CONFIG dictionary in config.py.

I don't have git knowledge therefore cannot do a pull request and also these changes will 100% break it on other operating systems.

Originally created by @Ahmedazim7804 on GitHub (Nov 28, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/898 As written in issue #805 in windows, archivebox fails to install node_modules SINGLEFILE_BINARY, READABILITY_BINARY, MERCURY_BINARY. although it can fixed by adding `kwargs['shell'] = True` to "run" function in "system.py" for Popen command. and commenting the `pgid = os.getpgid(process.pid)` line as in windows os module does not have getpgid function, i know it will break code later in case of exception. and adding `shell=True` parameter to `run_shell([ 'npm', 'install', '--prefix', str(out_dir), '--force', '--no-save', '--no-audit', '--no-fund', '--loglevel', 'error', ], capture_output=False, cwd=out_dir)` in `if USE_NODE:` code block in setup() function in main.py. After these changes archivebox installed modules fine but still was not recognizing them and was installing them on every `archivebox setup` command, it is because the `SINGLEFILE_BINARY` and `READABILITY_BINARY` have `.cmd` extension on windows. it could be fixed by replacing ` 'SINGLEFILE_BINARY': {'type': str, 'default': lambda c: bin_path('single-file')}, 'READABILITY_BINARY': {'type': str, 'default': lambda c: bin_path('readability-extractor')},` to ` 'SINGLEFILE_BINARY': {'type': str, 'default': lambda c: bin_path('single-file.cmd')}, 'READABILITY_BINARY': {'type': str, 'default': lambda c: bin_path('readability-extractor.cmd')},` in `DEPENDENCY_CONFIG` dictionary in config.py. I don't have git knowledge therefore cannot do a pull request and also these changes will 100% break it on other operating systems.
kerem closed this issue 2026-03-01 17:56:13 +03:00
Author
Owner

@Ahmedazim7804 commented on GitHub (Nov 28, 2021):

Sorry, for my stupidity i read it now that ArchiveBox is not supported on windows natively without docker or wsl.

<!-- gh-comment-id:981124250 --> @Ahmedazim7804 commented on GitHub (Nov 28, 2021): Sorry, for my stupidity i read it now that ArchiveBox is not supported on windows natively without docker or wsl.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2068
No description provided.