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

Throws error if /middleware doesn't exist #7

Closed
toniengelhardt opened this issue Feb 11, 2021 · 3 comments
Closed

Throws error if /middleware doesn't exist #7

toniengelhardt opened this issue Feb 11, 2021 · 3 comments

Comments

@toniengelhardt
Copy link

Describe the bug

Throws a friendly error if the middleware directory doesn't exist.

ERROR  Failed to compile with 1 errors                                       

This relative module was not found:                                           
                                                                             
* ./middleware in ./.nuxt/auth.js    

To Reproduce

  • Open a Nuxt project without middleware folder
  • Start dev server

Expected behavior

Should work also without middleware dir, if you don't have any middleware there is no need for the directory. Nuxt itself also allows it.

Screenshots

Screen Shot 2021-02-11 at 19 32 43

harlan-zw added a commit that referenced this issue Feb 12, 2021
fix(build): no disabling middleware, fixes #7
@harlan-zw
Copy link
Owner

Thank you @toniengelhardt

Previously I was disabling the middleware nuxt feature if you didn't have the folder, but that was clearly a mistake.

The next patch won't have this logic and will resolve your issue.

@toniengelhardt
Copy link
Author

Thanks @loonpwn, appreciate it!

@toniengelhardt
Copy link
Author

Great module btw!

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

2 participants