Closed laiso closed 4 months ago
NOTE: Unfortunately, even after this commit, direct download via npx does not work on Windows. Instead, we recommend checking out the source code and running npm start.
npm start -- "https://www.typescriptlang.org/docs/handbook/" "https://www.typescriptlang.org/docs/handbook/2/"
These changes add support for running the tool in a Windows environment.
Updates in
index.ts
:Replaced
import.meta.url
withfileURLToPath(import.meta.url)
to ensure the main function is called when the module is executed directly. This improves Node.js ES module compatibility.Updates in
README.md
:Added a troubleshooting section to address potential permission issues when running Puppeteer on Windows. Provided specific PowerShell commands and related links for resolving these issues. Also, changed the quotes in the example URLs from single to double quotes.
https://github.com/laiso/site2pdf/blob/b7ab0c9e21efa10b22db1b6957af25df89ec86a1/README.md?plain=1#L57-L65