Oak-Digital / types-4-strapi-2

Automate the creation of typescript interfaces for your strapi 4 projects
MIT License
24 stars 4 forks source link

Error: ENOENT: no such file or directory, scandir 'src/components' #11

Closed HenryC-3 closed 2 years ago

HenryC-3 commented 2 years ago

Description

An error appears after running npm run types

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, scandir 'src/components'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: 'src/components'
}

System info

Steps to reproduce

It can be reproduced in t4s-2-reproduce by running npm run types

Alexnortung commented 2 years ago

Thanks for sharing the issue and a reproduction repository. I will look into it.

Alexnortung commented 2 years ago

I think I know what is wrong, this won't be a problem when I get to create v1.

It seems that your project has no components, so a workaround would be to create a single component through strapi. Let me know if it works.

However of course this program should still work with no components in the src/ folder.

HenryC-3 commented 2 years ago

Sorry for the late replay. It works.

Thank you.

HenryC-3 commented 2 years ago

Sorry for the late replay. It works.

Thank you.

Alexnortung commented 2 years ago

This should now work in version 0.3.1