-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Node error if you try to console.log url param from page server file, crashes the page. #6385
Comments
I can't reproduce this in my own project. The code here kit/packages/kit/src/utils/url.js Lines 107 to 109 in 3ff8c21
|
Ah ha, it looks like the Node feature that this requires wasn't added until 16.14.0 - nodejs/node#41019 Irritatingly, the docs https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilinspectcustom don't mention this. The easiest option for you is going to be to update Node. On our end, we should perhaps just bump up the minimal required version. |
Describe the bug
If you have a +page.server.ts file and you try console log the event, or more specifically even the destructured url param, node will blow up and the page will fail to load. The exact error is in the logs below.
Reproduction
Create a new sveltekit demo app. App a /tester route with a +page.ts and a +page.server.ts file. Try to console.log the destructured url param or just the event object as a whole.
Logs
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: