api-platform / api-platform/create-client

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

Open
#383 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
376
Forks
132
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.