> [email protected] dev
> nodemon index.ts
[nodemon] 2.0.15
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `ts-node index.ts`
C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:4
return new (P || (P = Promise))(function (resolve, reject) {
^
Error: fastify-autoroutes dir C:\Users\wenxu\Projects\test\fileroutes\index.ts\src\routes does not exists
at C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\src\index.ts:116:19
at Generator.next (<anonymous>)
at C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:8:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:4:12)
at exports.default.fastify_plugin_1.default.fastify (C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\src\index.ts:98:7)
at Plugin.exec (C:\Users\wenxu\Projects\test\fileroutes\node_modules\avvio\plugin.js:132:19)
at Boot.loadPlugin (C:\Users\wenxu\Projects\test\fileroutes\node_modules\avvio\plugin.js:274:10)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
[nodemon] app crashed - waiting for file changes before starting...
C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:44
return next(new Error(${exports.ERROR_LABEL} dir ${dirPath} does not exists
));
^
Error: fastify-autoroutes dir C:\Users\wenxu\Projects\test\fileroutes\build\index.js\src\routes does not exists
at C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:44:21
at Generator.next ()
at C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:8:71
at new Promise ()
at __awaiter (C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:4:12)
at exports.default.fastify_plugin_1.default.fastify (C:\Users\wenxu\Projects\test\fileroutes\node_modules\fastify-autoroutes\dist\index.js:31:72)
at Plugin.exec (C:\Users\wenxu\Projects\test\fileroutes\node_modules\avvio\plugin.js:132:19)
at Boot.loadPlugin (C:\Users\wenxu\Projects\test\fileroutes\node_modules\avvio\plugin.js:274:10)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Am I doing this correctly? Perhaps I'm missing something?
I feel like on windows only, it's not resolving the paths to each of the routes correctly when it's doing the dynamic routes imports. ```C:\Users\wenxu\Projects\test\fileroutes\index.ts\src\routes does not exists.``` as we can see here, it's getting the absolute path to the file not the directly which causes issues here.
I know that the node module filesystem will also complain if ```file://``` isn't prepended at the beginning to tell it the protocol if it's an absolute file path (at least I think that could be an issue)).
Does this issue even occur on linux or mac?
If only on windows I could try to figure out what's wrong and make a PR, tho I'm a bit new to the Open source dev scene so Ill have to figure out how it works haha.
Thanks