Here's a tool that checks URLs for 404 and other 400-level errors, then exports the problematic ones to a downloadable spreadsheet.
This URL status checker tool allows you to:
Input URLs in two ways:
Check URL Status:
View Results:
Export Results:
I'll fix the XLSX library error by updating the code to use a browser-compatible approach for downloading files.
The error occurred because the XLSX library was trying to use Deno.writeFileSync, which is a Deno-specific function that doesn't exist in the browser environment. The XLSX.writeFile() function was attempting to directly write to the file system, which isn't possible in a browser context.
I've updated the downloadSpreadsheet function to:
XLSX.write() with type 'array'URL.createObjectURL()This approach is fully compatible with browser environments and will work properly in your Next.js application.
The new approach:
The tool should now correctly generate and download the Excel file containing the error URLs without any Deno-related errors.