opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
42 stars 0 forks source link

[Bug] "Repo url is required, use file:// for local repos" on local MacOS initialization #47

Closed gl-webentwicklung closed 6 months ago

gl-webentwicklung commented 6 months ago

Whenever I try to initialize the plugin, I get the error message:

"Error: repo url is required, use file:// for local repos"

Steps to reproduce:

Node Version: v20.9.0

NPM Version: 10.1.0

OS: MacOS 14.4

samuelstroschein commented 6 months ago

this being fixed atm. @jan.johannes looking forward to the release of the adjusted lix warning handling

janfjohannes commented 6 months ago

@samuelstroschein this is a completely different error message than what we talked about yesterday.

LorisSigrist commented 6 months ago

I'll take a look

janfjohannes commented 6 months ago

@LorisSigrist i see you allready fixed the one case in paraglide where file:// was missing. maybe its just an outdated library?

LorisSigrist commented 6 months ago

Pretty sure I see what this is. If a repo is found the current code doesn't prefix the path with "file://" & just uses the path itself. This conflicts with the stricter validation in openRepository. Should be a quick fix

janfjohannes commented 6 months ago

@LorisSigrist but findRepoRoot allready prefixes file:// . what place in code do you mean?

LorisSigrist commented 6 months ago

In that case I'm not sure. Will do some debugging

LorisSigrist commented 6 months ago

This should be fixed in @inlang/paraglide-js@1.3.5 that's about to release. The change that added the file:// prefix on all openRepository calls wasn't pushed out properly.

janfjohannes commented 6 months ago

ahhh thats exactly what i thouhgt