No module named 'masonite.provider'
Dwiga opened this issue · 2 comments
Describe the bug
I am trying to create API end point using masonite, but unfortunately I have something like this
masonite.exceptions.exceptions.LoaderNotFound: 'config.providers' not found OR error when importing this module: No module named 'masonite.provider'
Once I tried to run this command $ python craft provider ApiProvider
or when I imported from masonite.api.providers import ApiProvider
inside config/providers.py
it gave me the same thing once I hit python craft serve
Expected behaviour
I could create Api end point using masonite with ApiProvider
Steps to reproduce the bug
when I want to create Api end point
Screenshots
No response
OS
macOS
OS version
13
Browser
No response
Masonite Version
4.6.1
Anything else ?
No response
Hello, I had the same problem using masonite-dashboard because it's not compatible with the latest version of Masonite. If you see config/providers.py
you will notice that masonite providers are imported from masonite.providers
instead of masonite.provider
.
I suggest you to upgrade your project version.
the api provider import is wrong https://docs.masoniteproject.com/features/api#provider