nuxt-modules / strapi

Strapi Module for Nuxt
https://strapi.nuxtjs.org
MIT License
645 stars 81 forks source link

Unsupported version from install example #440

Closed xZyph closed 3 weeks ago

xZyph commented 4 weeks ago

Version

@nuxtjs/strapi: 1.12.0 nuxt: 3.13.0

Reproduction Link

https://codesandbox.io/p/devbox/rxycqg

Steps to reproduce

npx nuxi@latest init versionIssue && cd versionIssue (npm, No) npx nuxi@latest module add strapi

Add to nuxt.config.ts:

  strapi: {
    url: 'some-strapi-url',
    version: 'v5'
  },

Observe issue with 'v5' as value in VS Code.

What is Expected?

Since the documentation example explicitly use v5 as an example, I would imagine it is expected for this to work without any issues.

What is actually happening?

I am getting the error:

Type '"v5"' is not assignable to type '"v4" | "v3" | undefined'.ts(2322)
(property) version: "v5"
benjamincanac commented 3 weeks ago

You can now use https://github.com/nuxt-modules/strapi/releases/tag/v2.0.0.