-
Notifications
You must be signed in to change notification settings - Fork 40
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
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. #98
Comments
I have the same after updating to latest AdonisJS |
Oh boy... I hate the JS stack 🙄 will have a look into it |
Is this a Windows-only error, or a Node version error? I can't reproduce it on Linux with Node v21.6.1 |
I just deployed a possible fix in 3.47.0. Can you guys test it with that version? Otherwise I might need some help here from the windows folks. |
@ad-on-is Ok i will test it now |
well So I tried the update . But when i debug a little more i added this route
now its giving this error but comment.ts exists , it have already created the swagger.json here is the github repo of my project Node v21.7.3 |
Thx for the reproduction... This is an issue with |
Also... your config is wrong here. router.get("/swagger", async () => {
return router.toJSON()
});
router.get("/docs", async () => {
return AutoSwagger.default.ui("/swagger", swagger);
}); should be router.get("/swagger", async () => {
return AutoSwagger.default.docs(swagger);
});
router.get("/docs", async () => {
return AutoSwagger.default.ui("/swagger", swagger);
}); |
Close in favor of #102 |
Yup fixed Working now |
Hi upon running
node ace docs:generate
it worked before , but now after adding vinejs and validations now on running this command suddenly i am getting this error[ error ] Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, abs
olute paths must be valid file:// URLs. Received protocol 'c:' at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:239:11)
at defaultLoad (node:internal/modules/esm/load:130:3)
at nextLoad (node:internal/modules/esm/hooks:750:28)
at C:\Development\web\node\adonijs-nextjs\server\node_modules\ts-node\src\esm.ts:255:45
at async addShortCircuitFlag (C:\Development\web\node\adonijs-nextjs\server\node_modules\ts-node\src\esm.
ts:409:15) at async nextLoad (node:internal/modules/esm/hooks:750:22)
at async Hooks.load (node:internal/modules/esm/hooks:383:20)
at async handleMessage (node:internal/modules/esm/worker:199:18)
The text was updated successfully, but these errors were encountered: