brillout / telefunc

Remote Functions. Instead of API.
https://telefunc.com
MIT License
690 stars 31 forks source link

Windows issue: Wrongly formatted path #59

Closed jessielaf closed 1 year ago

jessielaf commented 1 year ago

Hi,

I am building the project using SvelteKit. When I run vite build I get an error:

[@brillout/vite-plugin-import-build:Telefunc] [telefunc@0.1.43][Bug] You stumbled upon a bug in Telefunc's source code. Reach ou
t at https://github.com/brillout/telefunc/issues/new or https://discord.com/invite/3DYWwk4xRQ and include this error stack (the error stack is usually e
nough to fix the problem). A maintainer will fix the bug (usually under 24 hours). Don't hesitate to reach out as it makes Telefunc more robust. Debug i
nfo (this is for the Telefunc maintainers; you can ignore this): Wrongly formatted path: C:\Users\Jessie\projects\boiler\.svelte-kit/output/server.     
[vite-plugin-sveltekit-compile] [telefunc@0.1.43][Bug] You stumbled upon a bug in Telefunc's source code. Reach out at https://github.com/brillout/telef
unc/issues/new or https://discord.com/invite/3DYWwk4xRQ and include this error stack (the error stack is usually enough to fix the problem). A maintaine
r will fix the bug (usually under 24 hours). Don't hesitate to reach out as it makes Telefunc more robust. Debug info (this is for the Telefunc maintain
ers; you can ignore this): Wrongly formatted path: C:\Users\Jessie\projects\boiler\.svelte-kit/output/server.
error during build:
Error: [telefunc@0.1.43][Bug] You stumbled upon a bug in Telefunc's source code. Reach out at https://github.com/brillout/telefunc/issues/new or https:/
/discord.com/invite/3DYWwk4xRQ and include this error stack (the error stack is usually enough to fix the problem). A maintainer will fix the bug (usual
ly under 24 hours). Don't hesitate to reach out as it makes Telefunc more robust. Debug info (this is for the Telefunc maintainers; you can ignore this)
    at Array.map (<anonymous>)
    at generateImporter (C:\Users\Jessie\projects\boiler\node_modules\@brillout\vite-plugin-import-build\dist\plugin\index.js:71:14)
    at Object.generateBundle (C:\Users\Jessie\projects\boiler\node_modules\@brillout\vite-plugin-import-build\dist\plugin\index.js:35:13)
    at file:///C:/Users/Jessie/projects/boiler/node_modules/rollup/dist/es/shared/rollup.js:23704:40

It seems like an error with windows specific path since half of the path is windows formatted and the other half is linux. This is only happens in rendering the ssr. The output before the error:


vite v4.0.4 building for production...
✓ 353 modules transformed.
11:35:05 [vite-plugin-svelte] dom compile done.
package         files    time      avg
boiler-new        169   4.04s   23.9ms

vite v4.0.4 building SSR bundle for production...
transforming (255) src\lib\utility\filterObject.ts"ZodSchema" is imported from external module "zod" but never used in "src/lib/auth/telefunc.ts", "src/
lib/domains/groups/schema.ts", "src/lib/components/forms/utility.ts" and "src/lib/domains/users/schema.ts".
✓ 261 modules transformed.
11:35:16 [vite-plugin-svelte] ssr compile done.
package         files    time     avg
brillout commented 1 year ago

Let me have a look.

brillout commented 1 year ago

I could reproduce. Let me fix this.

brillout commented 1 year ago

Fix released at 0.1.44. SvelteKit + Windows is now included in Telefunc's CI.

jessielaf commented 1 year ago

@brillout awesome, man! Thanks for your quick response.

brillout commented 1 year ago

In case I didn't mention it already: https://github.com/sponsors/brillout – in case your company is up for it :-).

jessielaf commented 1 year ago

@brillout Unfortunately, I am just working on some personal projects but maybe later!