The "path" argument must be of type string or an instance of URL

I'm trying to port our Hono backend to CF workers. Everything seems fine util I start the dev server:
Uncaught TypeError: The "path" argument must be of type string or an instance of URL. Received undefined
at node-internal:internal_url:155:15 in fileURLToPath
Uncaught TypeError: The "path" argument must be of type string or an instance of URL. Received undefined
at node-internal:internal_url:155:15 in fileURLToPath
I believe (but i'm not sure) that this might be related to some packages we're using. Some dependencies I suspect: - archiver - pdfkit
1 Reply
Gab
Gab2mo ago
I can’t say for sure which bug is triggering it, but your suspicion makes sense — libraries like archiver and pdfkit are both incompatible with the Workers sandbox. Also, Workers don’t have direct access to a filesystem at all Maybe try temporarily removing or replacing those libraries to test if the issue goes away.

Did you find this page helpful?