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 when creating strapi project with template + TypeScript #88

Open
thomasmol opened this issue Apr 27, 2023 · 2 comments
Open

Bug when creating strapi project with template + TypeScript #88

thomasmol opened this issue Apr 27, 2023 · 2 comments

Comments

@thomasmol
Copy link

I just created a strapi project using the Blog template and also added the --ts flag so typescript is enabled.
However: strapi won't recognize the collections etc. in the roles section in the template since they are .js files and not .ts.
Result: you can create collections that are created by the template like 'article', but when calling the rest api or checking permissions in the admin panel the collection is not shown.
Results in this error:

{
  data: null,
  error: {
    status: 404,
    name: 'NotFoundError',
    message: 'Not Found',
    details: {}
  }
}

when calling e.g. this rest api:
GET http://localhost:1337/api/articles

@jbstewart
Copy link

I just encountered this bug as well. If you create the content types manually then everything works fine - but using the --template blog argument with the --ts flag causes this issue.

@jordanahu
Copy link

Same here. I encountered the same problem just now with --ts flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants