-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
throw new Error(Directory ${absoluteDirectoryPath} exists
);
#537
Comments
Hello @obsidianart 👋 Seems strange. Could you please check that there are no other processes of the module running? Try to remove directory |
I restarted my machine, deleted docs, nothing else running, same error. |
Try to use Please check and let me know do you have the same issue as above or not |
I'm also having this same issue. |
With the same options the files have been downloaded in the respected path you have mentioned for the first time with this code.
and with the same options again you're using Promise .then() syntax. It will again try to upload files there - henceforth, it is causing that error. either we use async/await or promise. |
Good catch @tushar-rupani ! I missed the fact that scraper called 2 times |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Configuration
version: [result of
npm ls website-scraper --depth 0
command]website-scraper@5.3.1
options: [provide your full options object]
Description
The script is throwing an error. I did try to delete the folder but the error happens regardless after the script creates the folder
Expected behavior: [What you expect to happen]
No errors
Actual behavior: [What actually happens]
stefanosolinas@stefanos-MacBook-Pro-2 scraper % node index.js
file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/node_modules/website-scraper/lib/plugins/save-resource-to-fs-plugin.js:16
throw new Error(
Directory ${absoluteDirectoryPath} exists
);^
Error: Directory /Users/stefanosolinas/HDD/GIT/ollama private/scraper/docs exists
at file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/node_modules/website-scraper/lib/plugins/save-resource-to-fs-plugin.js:16:11
at Scraper.runActions (file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/node_modules/website-scraper/lib/scraper.js:229:20)
at Scraper.scrape (file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/node_modules/website-scraper/lib/scraper.js:276:15)
at default (file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/node_modules/website-scraper/index.mjs:4:30)
at file:///Users/stefanosolinas/HDD/GIT/ollama%20private/scraper/index.js:11:1
Node.js v20.3.0
Additional Information
[Any additional information, configuration or data that might be necessary to reproduce the issue]
The text was updated successfully, but these errors were encountered: