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

[Bug?]: RedwoodRecord generate model errors out on parseDatamodel #9069

Closed
1 task done
Cluster444 opened this issue Aug 25, 2023 · 2 comments · Fixed by #9158
Closed
1 task done

[Bug?]: RedwoodRecord generate model errors out on parseDatamodel #9069

Cluster444 opened this issue Aug 25, 2023 · 2 comments · Fixed by #9158
Labels
bug/confirmed We have confirmed this is a bug

Comments

@Cluster444
Copy link

What's not working?

When running the model generator the file gets written out but then the task fails on the second step writing the new index.js.

yarn rw g model Foo
✔ Generating model file...
✔ Successfully wrote file ./api/src/models/TrainingEquipment.js
← Reverted because: parseDatamodel is not a function
parseDatamodel is not a function

How do we reproduce the bug?

  1. Create a prisma model Foo
  2. Run rw record init
  3. Run rw g model Foo

What's your environment? (If it applies)

System:
    OS: macOS 13.2.1
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.16.0 - /private/var/folders/gp/d_b2mzdn4x3_vqfcjs21k59h0000gn/T/xfs-25d32553/node
    Yarn: 3.6.0 - /private/var/folders/gp/d_b2mzdn4x3_vqfcjs21k59h0000gn/T/xfs-25d32553/yarn
  Databases:
    SQLite: 3.39.5 - /usr/bin/sqlite3
  Browsers:
    Chrome: 116.0.5845.110
    Safari: 16.3
  npmPackages:
    @redwoodjs/auth-dbauth-setup: 6.1.0 => 6.1.0
    @redwoodjs/core: 6.1.0 => 6.1.0

Are you interested in working on this?

  • I'm interested in working on this
@Cluster444 Cluster444 added the bug/needs-info More information is needed for reproduction label Aug 25, 2023
@jtoar jtoar added bug/confirmed We have confirmed this is a bug and removed bug/needs-info More information is needed for reproduction labels Sep 12, 2023
@jtoar
Copy link
Contributor

jtoar commented Sep 12, 2023

Hey @Cluster444, thanks for reporting! In reproducing this one, I found that the fix was simple and stole your chance to contribute and opened a PR here, sorry about that: #9158

@jtoar
Copy link
Contributor

jtoar commented Sep 13, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants