Code Monkey home page Code Monkey logo

next13-airbnb-clone's Issues

<Image> not work

error :

error - TypeError: fetch failed
    at Object.fetch (G:\code\frontend\airbnb-video\node_modules\next\dist\compiled\undici\index.js:1:26686)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  cause: Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
      at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
    errno: -4077,
    code: 'ECONNRESET',
    syscall: 'read'
  }
}

replace:

  {/* <Image
    fill
    style={{ objectFit: 'cover' }}
    src={value}
    alt='House'
  /> */}
  <CldImage
    fill
    src={value}
    preserveTransformations
    alt='House'
  />

I found that when using, the src attribute of the component is assigned the value:“ https://res.cloudinary.com/d..."

When using, it means "/next/image? URL=https% 3A% 2F% 2Fres. cloud. com% 2Fdc4qoly2g% 2Fmage% 2Fpload% 2Fv1686169429% 2Frp6bsp1wemaqsx0q8x4v. jpg&w=3840&q=75“.

I don't know why, but I successfully displayed the image.

Success and error on login

When I attempt to login with incorrect credentials I get both the 'Logged in' message and the error message.

It appears that 'if (callback?.ok) ' is returning a true value even though the credentials are wrong.

ERROR Module parse failed: Unexpected token (1:0) about 'currentUser'

The code for currentUser has ended at 2:32:53 in the video, but I encountered a problem. I've tried many methods, but they haven't solved it.

After I logged in, I didn't do anything, just add currentUser={currentUser} to report an error:

error - ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <!doctype html>
| <html>
| <head>

Import trace for requested module:
./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html   
./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$
./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
./node_modules/bcrypt/bcrypt.js
./pages/api/auth/[...nextauth].ts
./app/actions/getCurrentUser.ts
./app/layout.tsx
...

At this point, an error was already reported before SafeUser, and it is still reported after completion.

Then I tried to set currentUser={null} and restart 'npm run dev', and this error disappeared and never appeared again. Setting currentUser={currentUser} again will not result in an error. I don't know why this happened.

I took a long time, even git reset, perhaps this is helpful for some people.

/* layout.tsx */
export default async function RootLayout({
  children
}: {
  children: React.ReactNode
}) {
  // const currentUser = await getCurrentUser()
  return (
    <html lang="en">
      <body className={font.className}>
        <ClientOnly>
          <ToasterProvider />
          <LoginModal />
          <RegisterModal />
          <Navbar currentUser={null} />
        </ClientOnly>

        {children}
      </body>
    </html>
  )
}

<Map center={coordinates} /> error in ListingInfo.tsx

I receive the following compile time error in components/listings/ListingInfo.tsx -- 'Map' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> | Component<MapProps, any, any> | null' is not a valid JSX element.
Type 'Component<MapProps, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<MapProps, any, any>' is not assignable to type 'ElementClass'.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type .....
Type 'ReactElement<any, string | JSXElementConstructor>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor>' but required in type 'ReactPortal'.ts(2786)
index.d.ts(175, 9): 'children' is declared here.
-- Is there a suggested fix for this?

Getting 500 status code when trying to create listing

i am getting this error on Network tab inside edge devtool returning 500 internal server error

the error goes like this

Request Method: POST
Status Code: 500 Internal Server Error
Remote Address: [::1]:3000
Referrer Policy: strict-origin-when-cross-origin

error image in browser

error image

error image in VSCode Terminal

error2

Middleware error on deployment

I'm getting the following error when I try to deploy on Vercel, I have no idea why.

Error: The Edge Function "middleware" is referencing unsupported modules:

18:27:29.537 | - next: stream, fs, url
18:27:30.078 | Deployment completed
18:27:29.650 | NOW_SANDBOX_WORKER_EDGE_FUNCTION_UNSUPPORTED_MODULES: The Edge Function "middleware" is referencing unsupported modules: - next: stream, fs, url

Screenshot 2023-05-10 184132

One thing to note is that I had to add this line: export const dynamic = "force-dynamic"; to fix a different deployment error, I don't know if that has anything to do with it.

current user can't get in layout.ts file

I wrote code just like you. but user can get successfully in getCurrentUser.ts file. but can't get in layout.ts file. it's showing undefined. and error is like this,

[next-auth][warn][EXPERIMENTAL_API]
getServerSession is used in a React Server Component.
https://next-auth.js.org/configuration/nextjs#getServerSession}
https://next-auth.js.org/warnings#EXPERIMENTAL_API
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
[next-auth][warn][DEBUG_ENABLED]
https://next-auth.js.org/warnings#debug_enabled

license

Hello, can I use this version on the internet without any license issues with AirBnB?

Error when deploying

Got this error below when deploying to Vercel. Works fine with localhost. Anyone can help? Many thanks :
Error: Invalid prisma.listing.findMany() invocation,
Raw query failed
at getListings (/vercel/path0/.next/server/chunks/983.js:80:15)
at async Home (/vercel/path0/.next/server/app/page.js:480:22)

Error while hosting to vercel through github


PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the prisma generate command during the build process.

18:15:56.911 |  
18:15:56.914 | Learn how: https://pris.ly/d/vercel-build
18:15:56.914 | at checkPlatformCaching (/vercel/path0/node_modules/@prisma/client/runtime/library.js:166:69)
18:15:56.915 | at new PrismaClient (/vercel/path0/node_modules/@prisma/client/runtime/library.js:179:3374)
18:15:56.915 | at 61306 (/vercel/path0/.next/server/chunks/627.js:141:37)
18:15:56.915 | at webpack_require (/vercel/path0/.next/server/webpack-runtime.js:25:43)
18:15:56.915 | at 77561 (/vercel/path0/.next/server/app/api/listings/route.js:192:16)
18:15:56.916 | at webpack_require (/vercel/path0/.next/server/webpack-runtime.js:25:43)
18:15:56.922 | at webpack_exec (/vercel/path0/.next/server/app/api/listings/route.js:283:39)
18:15:56.923 | at /vercel/path0/.next/server/app/api/listings/route.js:284:78
18:15:56.923 | at webpack_require.X (/vercel/path0/.next/server/webpack-runtime.js:150:21)
18:15:56.923 | at /vercel/path0/.next/server/app/api/listings/route.js:284:47 {
18:15:56.923 | clientVersion: '4.13.0',
18:15:56.924 | errorCode: undefined
18:15:56.926 | }
18:15:56.927 |  
18:15:56.928 | > Build error occurred
18:15:56.928 | Error: Failed to collect page data for /api/listings
18:15:56.928 | at /vercel/path0/node_modules/next/dist/build/utils.js:1062:15
18:15:56.928 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
18:15:56.929 | type: 'Error'
18:15:56.929 | }
18:15:57.139 | Error: Command "npm run build" exited with 1
18:15:57.440 | Deployment completed
18:15:57.393 | BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

****************************************************

Im getting this error while deploying this air bnb project to vercel. I did everything accordingly how Antonio said in that video.
I checked twice by running 'npm run lint'. And there are no errors after executing this command. Im still not getting why this error is happening. If anyone knows how to fix this, kindly please reply back.
ThankYou

error on deploy

i get

Error: Dynamic server usage: searchParams.userId

and

Error occurred prerendering page "/"

when i deploy in vercel

Prerendering Error: ReferenceError: window is not defined

Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at /home/takeru9016/Projects/airbnb-clone/.next/server/chunks/118.js:33080:19
at /home/takeru9016/Projects/airbnb-clone/.next/server/chunks/118.js:32858:11
at 21227 (/home/takeru9016/Projects/airbnb-clone/.next/server/chunks/118.js:32860:3)
at webpack_require (/home/takeru9016/Projects/airbnb-clone/.next/server/webpack-runtime.js:25:43)
at 88605 (/home/takeru9016/Projects/airbnb-clone/.next/server/chunks/885.js:1444:65)
at webpack_require (/home/takeru9016/Projects/airbnb-clone/.next/server/webpack-runtime.js:25:43)
at 97368 (/home/takeru9016/Projects/airbnb-clone/.next/server/chunks/885.js:2944:63)
at webpack_require (/home/takeru9016/Projects/airbnb-clone/.next/server/webpack-runtime.js:25:43)
at 35131 (/home/takeru9016/Projects/airbnb-clone/.next/server/chunks/885.js:118:69)
at webpack_require (/home/takeru9016/Projects/airbnb-clone/.next/server/webpack-runtime.js:25:43)

Export encountered errors on following paths:
/favorites/page: /favorites
/page: /
/properties/page: /properties
/reservations/page: /reservations
/trips/page: /trips

Description:
I encountered a prerendering error while running my Next.js application. The error message states: "ReferenceError: window is not defined." This error occurs during the process of generating static pages, specifically when prerendering the pages "/" (homepage), "/favorites", "/reservations", "/properties", and "/trips".

I have followed the link provided in the error message (https://nextjs.org/docs/messages/prerender-error) to gather more information, but I couldn't find a specific solution for this issue.

It seems that the error is related to the usage of the window object in a server-side context. The window object is only available in the browser environment and not in the Node.js environment used during server-side rendering.

I would appreciate any guidance or suggestions on how to resolve this error and successfully prerender these pages in my Next.js application.

Error: Dynamic server usage (vercel)

스크린샷 2023-08-30 오후 6 39 47

I found the same error as the picture while distributing in vercel, but I still don't know how to solve it.

I think searchParams parts is the problem..

ERROR ON DEPLOY VERCEL

`

PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the prisma generate command during the build process.

11:12:58.640 |  
11:12:58.640 | Learn how: https://pris.ly/d/vercel-build
11:12:58.640 | at qa (/vercel/path0/node_modules/@prisma/client/runtime/library.js:161:69)
11:12:58.640 | at new t (/vercel/path0/node_modules/@prisma/client/runtime/library.js:174:3203)
11:12:58.640 | at 61306 (/vercel/path0/.next/server/chunks/627.js:141:37)
11:12:58.641 | at webpack_require (/vercel/path0/.next/server/webpack-runtime.js:25:43)
11:12:58.641 | at 18627 (/vercel/path0/.next/server/chunks/627.js:34:16)
11:12:58.641 | at webpack_require (/vercel/path0/.next/server/webpack-runtime.js:25:43)
11:12:58.641 | at 71673 (/vercel/path0/.next/server/app/api/favorites/[listingId]/route.js:153:22)
11:12:58.642 | at webpack_require (/vercel/path0/.next/server/webpack-runtime.js:25:43)
11:12:58.642 | at webpack_exec (/vercel/path0/.next/server/app/api/favorites/[listingId]/route.js:265:39)
11:12:58.653 | at /vercel/path0/.next/server/app/api/favorites/[listingId]/route.js:266:78 {
11:12:58.653 | clientVersion: '4.14.1',
11:12:58.656 | errorCode: undefined
11:12:58.656 | }
11:12:58.657 |  
11:12:58.657 | > Build error occurred
11:12:58.658 | Error: Failed to collect page data for /api/favorites/[listingId]
11:12:58.658 | at /vercel/path0/node_modules/next/dist/build/utils.js:1152:15
11:12:58.658 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
11:12:58.659 | type: 'Error'
11:12:58.659 | }
11:12:58.759 | Error: Command "npm run build" exited with 1
11:12:59.075 | Deployment completed
11:12:59.025 | BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

'

Error: when trying to access specific home (getListingById)

I am getting an error in "getListingById" action, that i think is related to prisma and i cant find a solution for it:

Screenshot 2023-09-24 at 11 54 13

import prisma from '@/app/libs/prismadb';

interface IParams {
  listingId?: string;
}

export default async function getListingById(params: IParams) {
  try {
    const { listingId } = params;

    const listing = await prisma.listing.findUnique({
      where: {
        id: listingId,
      },
      include: {
        user: true,
      },
    });

    if (!listing) {
      return null;
    }

    return {
      ...listing,
      createdAt: listing.createdAt.toString(),
      user: {
        ...listing.user,
        createdAt: listing.user.createdAt.toString(),
        updatedAt: listing.user.updatedAt.toString(),
        emailVerified: listing.user.emailVerified?.toString() || null,
      },
    };
  } catch (error: any) {
    throw new Error(error);
  }
}

Can't connect to Mongodb

Hello, I just cloned the repo and did the steps from the project description to set up the project and test it out. As I connected to the database I received the following error:
I did the same steps as in the video, and tried to find a solution in the prisma doc ans Stack Overflow... but nothing let to a result.
Thx for helping!

Error: Error:
Invalid prisma.listing.findMany() invocation:

error: Environment variable not found: DATABASE_URL.
--> schema.prisma:10
|
9 | provider = "mongodb"
10 | url = env("DATABASE_URL")
|

Validation Error Count: 1

VS Code extensions

Please publish the preferred list of VS Code extensions for this project. I am not able to follow along fast without this.
Thanks.

Warn Entire page deopted into client-side rendering

Hi @AntonioErdeljac , hi all. I do have the following warn:

warn Entire page /reservations deopted into client-side rendering.
https://nextjs.org/docs/messages/deopted-into-client-rendering /reservations

I tried as in the link right here above to surround the ReservationsClient component with <Suspense fallback={} /> but without any result, the warn is still there. Same warn also in /favorites /properties and so on.

Do you guys have any idea? Many thanks.

getListing filter out reserved lists

https://github.com/AntonioErdeljac/next13-airbnb-clone/blob/7d914ed9a6fd1a0460191f68bb80359bf0a55591/app/actions/getListings.ts#L61C5-L61C5
instead of this:
image

if (startDate && endDate) { query.NOT = { reservations: { some: { OR: [ { endDate: { gte: startDate }, startDate: { lte: startDate } }, { startDate: { lte: endDate }, endDate: { gte: endDate } } ] } } } }
can omit the OR logic and filter like this:
if (startDate && endDate) { // {NOT:{}} for prisma query.NOT = { reservations: { //some-- one or more ("some") related records match filtering criteria some: { // reserved date starts earlier than your end date and finish later than your start date endDate: { gte: startDate }, startDate: { lte: endDate }, }, }, }; }
image

If date ranges are clashing it will satisfy =>reserved date starts earlier than your end date and finishes later than your start date

Cannot read properties of undefined (reading 'findUnique')

when sign up by Github, i get below errors. how to fix this error??

[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR] https://next-auth.js.org/errors#oauth_callback_handler_error Cannot read properties of undefined (reading 'findUnique') TypeError: Cannot read properties of undefined (reading 'findUnique') at getUserByEmail (J:\My-Projects\Next\airbnb-clone\node_modules\@next-auth\prisma-adapter\dist\index.js:208:43) at _callee2$ (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\core\errors.js:365:29) at tryCatch (J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\regeneratorRuntime.js:44:17) at Generator.<anonymous> (J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\regeneratorRuntime.js:125:22) at Generator.next (J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\regeneratorRuntime.js:69:21) at asyncGeneratorStep (J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\asyncToGenerator.js:3:24) at _next (J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\asyncToGenerator.js:22:9) at J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\asyncToGenerator.js:27:7 at new Promise (<anonymous>) at J:\My-Projects\Next\airbnb-clone\node_modules\@babel\runtime\helpers\asyncToGenerator.js:19:12 at callbackHandler (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\core\lib\callback-handler.js:169:49) at async Object.callback (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\core\routes\callback.js:119:13) at async AuthHandler (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\core\index.js:208:28) at async NextAuthApiHandler (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\next\index.js:22:19) at async NextAuth._args$ (J:\My-Projects\Next\airbnb-clone\node_modules\next-auth\next\index.js:106:14) { name: 'GetUserByEmailError', code: undefined } API handler should not return a value, received object. API handler should not return a value, received object. API handler should not return a value, received object. [next-auth][warn][EXPERIMENTAL_API]getServerSession is used in a React Server Component. https://next-auth.js.org/configuration/nextjs#getServerSession} https://next-auth.js.org/warnings#EXPERIMENTAL_API [next-auth][warn][NEXTAUTH_URL] https://next-auth.js.org/warnings#nextauth_url [next-auth][warn][DEBUG_ENABLED] https://next-auth.js.org/warnings#debug_enabled

Middleware error on deployment

Upon hosting the website, the pages like /reservations or /favorites are not working upon clicking the buttons for these domains, I get a error 404, upon trying the same with npm run build in terminal, I receive this as the error message.
image

Multi user booking

In a case where you need 2 separate people to book your property. There's an issue, since the functionalities used prevent that from happening. Any help to allow multi booking?

Rent modal inputs rendering same value

Hello everyone.

I found the following issue while testing the application:

Issue-rent-modal

It looks like the title and price inputs are not being re-rendered when navigating back and forward using the next and back steps. Or most likely, React is not able to differentiate between them. I faced this issue in the past and solving it is very easy. Just need to add a key value to each input (can use the same id value) like so:

<Input
	key="price" // adding this key will tell react that the inputs are different
	id="price"
	label="Price"
	type="number"
	formatPrice
	register={register as unknown as UseFormRegister<FieldValues>}
	errors={errors}
	required
	disabled={isLoading}
/>

Error when registering with google or github - Invalid `prisma.account.create()

Hi,

I am getting this error when I try to sign up either google or github:

Inconsistent column data: Malformed ObjectID: invalid character 'y' was found at index 0 in the provided hex string: "ya29.a0AbVbY6M100HYtyAvdHeXkTAR0A-WXVfZmz4vtyMl61W7dWswrbZDJ4ACrM6NGW_DCveCiKjjhgkcL1k79raviGueCGZ1hV1KstrFm5uoMLgCNeenHPKnJHJaMPzoT8B0GS0C6scZ0rR7slCA_6wTHtqErmPM5dvQ2QaCgYKAVcSARESFQFWKvPlt6ccOyBXze5TU9VrXrnB8w0165" for the field 'access_token'. Error: 
Invalid `prisma.account.create()` invocation:

[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error

The user is created into the User document but not into the Account document.

This is how my prisma schema is defined:

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

model User {
  id             String    @id @default(auto()) @map("_id") @db.ObjectId
  name           String?
  email          String?   @unique
  emailVerified  DateTime?
  image          String?
  hashedPassword String?
  createdAt      DateTime  @default(now())
  modifiedAt     DateTime  @updatedAt
  favoriteIds    String[]  @db.ObjectId

  accounts     Account[]
  listings     Listing[]
  reservations Reservation[]
}

model Account {
  id                String  @id @default(auto()) @map("_id") @db.ObjectId
  userId            String  @db.ObjectId
  type              String
  provider          String
  providerAccountId String
  refresh_token     String? @db.String
  access_token      String? @db.String
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String? @db.String
  session_state     String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model Listing {
  id            String   @id @default(auto()) @map("_id") @db.ObjectId
  title         String
  description   String
  imageSrc      String
  createdAt     DateTime @default(now())
  category      String
  roomCount     Int
  bathroomCount Int
  guestCount    Int
  locationValue String
  userId        String   @db.ObjectId
  price         Int

  user         User          @relation(fields: [userId], references: [id], onDelete: Cascade)
  reservations Reservation[]
}

model Reservation {
  id         String   @id @default(auto()) @map("_id") @db.ObjectId
  userId     String   @db.ObjectId
  listingId  String   @db.ObjectId
  startDate  DateTime
  endDate    DateTime
  totalPrice Int
  createdAt  DateTime @default(now())

  user    User    @relation(fields: [userId], references: [id], onDelete: Cascade)
  listing Listing @relation(fields: [listingId], references: [id], onDelete: Cascade)
}

I hope you could give me a hint of what's happening.

Regards,

Unable to login

SignIn function give me errror and redirect my page to localhost:3000/api/auth/error. Have anyone solved this??? @AntonioErdeljac Im using NextJS 13.4 App Router

image
image

npm run build - error

I have installed Next.js v13.3.4

Anyone can solve it?. Much appreciated guys. Thanks!

info - Creating an optimized production build
info - Compiled successfully
info - Linting and checking validity of types
info - Collecting page data
[= ] info - Generating static pages (6/11)Error: Error: Dynamic server usage: searchParams.userId
at getListings (C:\Users\Neil\Desktop\airbnb.next\server\chunks\680.js:80:15)
at Home (C:\Users\Neil\Desktop\airbnb.next\server\app\page.js:514:105)
at preloadComponent (C:\Users\Neil\Desktop\airbnb\node_modules\next\dist\server\app-render\preload-component.js:23:22)
at C:\Users\Neil\Desktop\airbnb\node_modules\next\dist\server\app-render\app-render.js:587:101

Login error

when i try to login with correct email and password
It's throw below error

image

Registration is not working

Registration is not working
I encountered the issue with registering the repository code and I wanted to add some additional information. I am receiving an error message stating that the registration failed due to an invalid token. I've tried regenerating the token and reattempting the registration, but the same error message persists.

Sign out callback error fixed

image

it was working. when i add middleware.ts file and deploy it also worked. but after clicking on logout button it showing error. how can i fix it?

DEPLOY ERROR

Failed to compile.

02:41:57.297 |  
02:41:57.297 | ./app/listings/[listingId]/page.tsx:27:25
02:41:57.297 | Type error: Type '{ createdAt: string; user: { createdAt: string; updatedAt: string; emailVerified: (() => string) | null; id: string; name: string | null; email: string | null; image: string | null; hashedPassword: string | null; favoriteIds: string[]; id_token: string | null; }; ... 10 more ...; price: number; }' is not assignable to type 'Omit<{ id: string; title: string; description: string; imageSrc: string; createdAt: Date; category: string; roomCount: number; bathroomCount: number; guestCount: number; locationValue: string; userId: string; price: number; }, "createdAt"> & { ...; } & { ...; }'.
02:41:57.297 | Type '{ createdAt: string; user: { createdAt: string; updatedAt: string; emailVerified: (() => string) | null; id: string; name: string | null; email: string | null; image: string | null; hashedPassword: string | null; favoriteIds: string[]; id_token: string | null; }; ... 10 more ...; price: number; }' is not assignable to type '{ user: SafeUser; }'.
02:41:57.298 | Types of property 'user' are incompatible.
02:41:57.298 | Type '{ createdAt: string; updatedAt: string; emailVerified: (() => string) | null; id: string; name: string | null; email: string | null; image: string | null; hashedPassword: string | null; favoriteIds: string[]; id_token: string | null; }' is not assignable to type 'SafeUser'.
02:41:57.298 | Type '{ createdAt: string; updatedAt: string; emailVerified: (() => string) | null; id: string; name: string | null; email: string | null; image: string | null; hashedPassword: string | null; favoriteIds: string[]; id_token: string | null; }' is not assignable to type '{ createdAt: string; updatedAt: string; emailVerified: string | null; }'.
02:41:57.298 | Types of property 'emailVerified' are incompatible.
02:41:57.298 | Type '(() => string) | null' is not assignable to type 'string | null'.
02:41:57.298 | Type '() => string' is not assignable to type 'string'.
02:41:57.298 |  
02:41:57.298 | 25 | return (
02:41:57.298 | 26 |
02:41:57.299 | > 27 |
02:41:57.299 | | ^
02:41:57.299 | 28 |
02:41:57.299 | 29 | );
02:41:57.299 | 30 | };
02:41:57.421 | Error: Command "npm run build" exited with 1

ANY SUGGESTIONS?

Screenshot 2023-09-08 at 03 08 30
Screenshot 2023-09-08 at 03 00 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.