clerk / t3-turbo-and-clerk

A t3 Turbo starter with Clerk as the auth provider.
https://clerk.dev
1.03k stars 75 forks source link

Receiving TypeError: privateMap.has is not a function at build #63

Closed RogerTerrazas closed 1 year ago

RogerTerrazas commented 1 year ago

Describe the bug

This is my first time installing the repo which I cloned directly 3/3/2023 (CST). So far I've setup Prisma, Expo, and XCode. I'm running pnpm dev to load the Next and IOS Emulator concurrently.

I then open up my local host to load the Next app. The root error I see is: TypeError: privateMap.has is not a function at build

To Reproduce Steps to reproduce the behavior:

  1. Ran these commands:
pnpm install 
pnpm dev 
  1. Opened http://localhost:3000/
  2. See error

Expected behavior I expect to load the default landing page of the application.

Logs

@acme/nextjs:dev: ready - started server on 0.0.0.0:3000, url: http://localhost:3000
@acme/expo:dev: Starting project at /Users/name/Codebase/twhyn/apps/expo
@acme/expo:dev: › Port 19000 is running this app in another window
@acme/expo:dev:   /Users/name/Codebase/twhyn/apps/expo (pid 83243)
@acme/expo:dev: › Skipping dev server
@acme/expo:dev: Input is required, but 'npx expo' is in non-interactive mode.
@acme/expo:dev: Required input:
@acme/expo:dev: > Use port 19001 instead?
@acme/db:dev: Prisma schema loaded from prisma/schema.prisma
@acme/db:dev: Prisma Studio is up on http://localhost:5556
@acme/nextjs:dev: event - compiled client and server successfully in 572 ms (307 modules)
@acme/nextjs:dev: wait  - compiling...
@acme/nextjs:dev: event - compiled successfully in 119 ms (264 modules)
@acme/nextjs:dev: wait  - compiling /src/middleware (client and server)...
@acme/nextjs:dev: event - compiled successfully in 107 ms (89 modules)
@acme/nextjs:dev: wait  - compiling / (client and server)...
@acme/nextjs:dev: event - compiled client and server successfully in 90 ms (360 modules)
@acme/nextjs:dev: error - TypeError: privateMap.has is not a function
@acme/nextjs:dev:     at Object.__classPrivateFieldSet (/Users/name/Codebase/twhyn/node_modules/tslib/tslib.js:254:25)
@acme/nextjs:dev:     at Function.getOrCreateInstance (/Users/name/Codebase/twhyn/node_modules/@clerk/nextjs/node_modules/@clerk/clerk-react/dist/isomorphicClerk.js:15:21)
....

@acme/nextjs:dev:   page: '/'
@acme/nextjs:dev: }

**Dev Environment

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This is my first time setting up the following tools or technologies so it could be something unrelated to this specific repo:

I also ran into this issue at one point: #44 but was able to resolve it, so I think. The emulator starts with the app but stays on a land screen. Not sure if this is the default behavior.

perkinsjr commented 1 year ago

I can't recreate this issue:

usually this is related to

  1. pnpm did not install all of the monorepo correctly.
  2. pnpm is not correctly symlinking.

You can do two things here:

  1. Delete the template.
  2. Check it out.
  3. Add .env with keys.
  4. make sure you add the key to app/expo/app.config
  5. pnpm i
  6. pnpm run dev.

Or you can try

pnpm clean:workspaces pnpm clean pnpm i

perkinsjr commented 1 year ago

Closing due to no activity after 30 days.