strapi / starters-and-templates

Monorepo for all official Strapi v4 templates
MIT License
321 stars 114 forks source link

Bug when creating strapi project with template + TypeScript #88

Open thomasmol opened 1 year ago

thomasmol commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

borzaka commented 1 month ago