create-client icon indicating copy to clipboard operation
create-client copied to clipboard

The requested module does not provide an export named 'Ref' in Nuxt Form

Open robregonm opened this issue 10 months ago • 1 comments

API Platform version(s) affected: 3.2.18

Description
Error when loading generated Form page for a resource: The requested module '...' does not provide an export named 'Ref'

How to reproduce

  • Create an Entity e.g. "Animal"
  • Create a Nuxt project
  • Create a client (e.g. yarn create @api-platform/client https://localhost/ . --generator nuxt --resource animal )
  • Load https://localhost/animal/create You'll get a message saying: "The requested module does not provide an export named 'Ref'"

Possible Solution
Just go to ./components/animal/AnimalForm.vue and replace: import { Ref } from "vue"; to import type { Ref } from "vue";

Additional Context
Nuxt v.3.11.1 Vue v.3.4.21

robregonm avatar Mar 29 '24 16:03 robregonm

Hello @robregonm

Thank you for bringing this to our attention. We plan to address this issue in an upcoming release. Please stay tuned for updates!

J3m5 avatar Apr 09 '24 14:04 J3m5