Skip to content

Error when trying to add a user via studio #277

Closed

Description

@chrisdrackett

Schema:

model User {
  id              String    @default(cuid()) @id @unique
  createdAt       DateTime  @default(now())
  updatedAt       DateTime  @updatedAt

  name            String?
  email           String    @unique

  following       User[]    @relation("FollowRelation")
  followers       User[]    @relation("FollowRelation")

  logs            Log[]     @relation("UserLogs")
  projects        Project[] @relation("ProjectMembers")

  items           Item[]    @relation("OwnedItems")
  itemsCreated    Item[]    @relation("CreatedItems")

  projectsCreated Project[] @relation("CreatedProjects")
}

Error dump
Cannot set property 'createdAt' of undefined

Stacktrace
TypeError: Cannot set property 'createdAt' of undefined
at http://localhost:5555/studioBundle.js:102:29947
at Array.reduce ()
at http://localhost:5555/studioBundle.js:102:29770
at Array.reduce ()
at Nn (http://localhost:5555/studioBundle.js:102:29342)
at Hn. (http://localhost:5555/studioBundle.js:102:38261)
at Generator.next ()
at $ (http://localhost:5555/studioBundle.js:16:6357)
at Generator.i (http://localhost:5555/studioBundle.js:16:6129)
at u (http://localhost:5555/studioBundle.js:16:23416)
at http://localhost:5555/studioBundle.js:16:23695
at new Promise ()
at Hn. (http://localhost:5555/studioBundle.js:16:23302)
at $ (http://localhost:5555/studioBundle.js:16:6357)
at i (http://localhost:5555/studioBundle.js:16:6129)
at onClick (http://localhost:5555/studioBundle.js:102:83197)
at Object.a (http://localhost:5555/studioBundle.js:65:769)
at p (http://localhost:5555/studioBundle.js:65:924)
at http://localhost:5555/studioBundle.js:65:1562
at S (http://localhost:5555/studioBundle.js:65:1651)
at D (http://localhost:5555/studioBundle.js:65:2087)
at L (http://localhost:5555/studioBundle.js:65:1899)
at T (http://localhost:5555/studioBundle.js:65:2986)
at In (http://localhost:5555/studioBundle.js:65:30383)
at Pa (http://localhost:5555/studioBundle.js:65:98483)
at ze (http://localhost:5555/studioBundle.js:65:10262)
at Dn (http://localhost:5555/studioBundle.js:65:30863)
at http://localhost:5555/studioBundle.js:65:98761
at Object.t.unstable_runWithPriority (http://localhost:5555/studioBundle.js:74:3198)
at Ra (http://localhost:5555/studioBundle.js:65:98685)
at xn (http://localhost:5555/studioBundle.js:65:30606)
at HTMLDocument.i (http://localhost:5555/studioBundle.js:88:12184)

Activity

  1. added this to the milestone on Nov 15, 2019
  2. added
    bug/0-unknown
    kind/bug
    on Nov 18, 2019
  3. sdnts commented on Nov 20, 2019

    @sdnts

    Hey @chrisdrackett, I've just pushed out alpha.337, and I cannot seem to reproduce this issue there. Could you try the alpha out?
    If you still see it, could you show me the entire schema you're using? That'd help, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug/0-unknownkind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions