Skip to content

[Bug?]: missing export from formatters.tsx after scaffold generation with Json field #6900

@domvernon

Description

@domvernon

What's not working?

The jsonDisplay function was removed from the 'Name' scaffold template as part of #6221, but this is still generated as an import as part of scaffold.js. This causes an error as the generated component is looking for an export in formatters.tsx that doesn't exist.

How do we reproduce the bug?

Generate a scaffold from a model with a field that has a Json type.

export 'jsonDisplay' (imported as 'jsonDisplay') was not found in '../../../lib/formatters' (possible exports: checkboxInputTag, formatEnum, jsonTruncate, timeTag, truncate)

What's your environment? (If it applies)

System:
    OS: macOS 13.0.1
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 16.15.0 - /private/var/folders/1m/mr7mmp951fg1qhpjf_1j_ddr0000gn/T/xfs-d3584efc/node
    Yarn: 3.2.4 - /private/var/folders/1m/mr7mmp951fg1qhpjf_1j_ddr0000gn/T/xfs-d3584efc/yarn
  Databases:
    SQLite: 3.39.4 - /usr/bin/sqlite3
  Browsers:
    Chrome: 107.0.5304.110
    Firefox: 106.0.5
    Safari: 16.1
  npmPackages:
    @redwoodjs/core: 3.4.0 => 3.4.0

Are you interested in working on this?

  • I'm interested in working on this

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/needs-infoMore information is needed for reproduction

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions