Skip to content
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

Error: msg.startsWith is not a function on Guestbook page #636

Open
christianavi opened this issue Jul 13, 2023 · 3 comments
Open

Error: msg.startsWith is not a function on Guestbook page #636

christianavi opened this issue Jul 13, 2023 · 3 comments

Comments

@christianavi
Copy link

So like I mentioned on the title, I get this error whenever I open the guestbook/ page:
Unhandled Runtime Error
Error: msg.startsWith is not a function

Source
console.error
node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected]\node_modules\next\dist\esm\server\app-render\preload-component.js (5:0)

app\guestbook\page.tsx (48:12) @ error

  46 |   }
  47 | } catch (error) {
> 48 |   console.error(error);
     |          ^
  49 | }
  50 | 
  51 | return (

This is what I see on the console:

  - error TypeError: msg.startsWith is not a function
    at GuestbookPage (./app/guestbook/page.tsx:52:17)
    at async Promise.all (index 0)

I am out of my depth here. I tried to find msg.startsWith on the whole project, but there were no results of it. What could this be?

@christianavi christianavi changed the title Error: msg.startsWith is not a function Error: msg.startsWith is not a function on Guestbook page Jul 13, 2023
@Nouhack
Copy link

Nouhack commented Jul 17, 2023

i had the same error , until someone told me : #634 (comment)

@z4nr34l
Copy link

z4nr34l commented Aug 14, 2023

I've found a workaround some time ago.

(On latest next version) You need to install next-auth manual commit version "next-auth": "0.0.0-manual.83c4ebd1", and add opentelemetry packages versions override according to package manager you are using to your package.json:

"pnpm": {
    "overrides": {
      "@opentelemetry/api": "1.4.1",
      "@opentelemetry/core": "1.13.0",
      "@opentelemetry/exporter-trace-otlp-grpc": "0.39.1",
      "@opentelemetry/resources": "1.13.0",
      "@opentelemetry/sdk-trace-base": "1.13.0",
      "@opentelemetry/sdk-trace-node": "1.13.0",
      "@opentelemetry/semantic-conventions": "1.13.0"
    }
  },

After that make a clean install of packages and try again, in my projects it worked like a charm.

IF you would still have problems with that, feel free to get in touch (discord: z4nr34l)

@z4nr34l
Copy link

z4nr34l commented Nov 22, 2023

This error should not existst now, as I see that page was migrated out from contentlayer, so had I done in my repository, and cant reproduce this issue anymore.

@leerob could you close the issue as it is outdated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants