-
Notifications
You must be signed in to change notification settings - Fork 123
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
File extension required in serverMiddleware #80
Comments
@llienard I'm aware of this issue, thanks for creating it though ! The thing is that for now it's the Current workaround is moving |
Thanks for your reply @kevinmarrec I understand the issue but it would be nice to add a note to the documentation because the |
WorkaroundsWorkaround N°1 Workaround N°2 (Recommended) export default {
extensions: ['ts']
} Workaround N°3 export default {
extensions: ['ts']
} Fix proposalUse new CLI hooks (starting Nuxt 2.9.1), especially |
Will be fixed with next runtime version and Nuxt 2.10 (there will be release note that force user to use Nuxt 2.10 to have the updated TS runtime working) It will be fixed thanks to this refactor using Nuxt 2.10 hooks : #97 Closing as the PR has been merged. |
It seems new version doesn't works for me. Versions
|
I got help in Discord server. |
Describe the bug
File extension .ts is required in nuxt.config.ts serverMiddleware
To Reproduce
Steps to reproduce the behavior:
server/middleware.ts
node ./node_modules/\@nuxt/typescript-runtime/bin/nuxt-ts.js build
node ./node_modules/\@nuxt/typescript-runtime/bin/nuxt-ts.js start
Error: Cannot find module '~/server/middleware'
Expected behavior
This should work
The text was updated successfully, but these errors were encountered: