-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
TypeError: Cannot read properties of undefined (reading 'startsWith') #463
Comments
Hmm, I tested this in a vanilla Vite app and a Remix app and it worked fine, so I agree this may be a Next.js specific issue. I'll try to reproduce it here in a bit. They probably do something weird to We used the |
hibp v14.1.1 should resolve your issue @PodStuart. I confirmed the problem and this solution in fresh Pages Router and App Router projects. Sorry about the hassle and thanks for reporting it! @all-contributors please add @PodStuart for bug report |
I couldn't determine any contributions to add, did you specify any contributions? I've put up a pull request to add @PodStuart! 🎉 |
Thank you for lightning fast resolution much appreciated. |
Since v14.1.0 we have started seeing an error occurring at
hibp/src/api/fetch-polyfill.ts
Line 12 in b2901eb
Debugging through I can see that process is actually defined when this code executes. I think perhaps this could be a Next.js thing but I am not totally sure. We call hibp from the browser I should add.
I wonder if using
typeof window === 'undefined'
rather thantypeof process !== 'undefined'
might be an approach which would have the same effect but not impact on Next.js users.Thanks.
The text was updated successfully, but these errors were encountered: