-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Missing $lib/paraglide from skeleton project #258
Comments
Unfortunately, I'm unable to replicate the issue with the provided selections. Can you trim it down to only the minimally reproducible portions (i.e. only selecting |
Same thing with minimal options selected, here's the link to the repo https://github.com/pe1uca/testSvCreate
|
@pe1uca I experienced the same issue, but it was eventually simply the fetch of inlang plugins from https://cdn.jsdelivr.net failing at compilation time. When running
I solved by disabling SSL verification for the process as a workaround. HTH... |
you can load the inlang plugins from node_modules via fs path instead. just install the packages for them as devDependency. |
Can you give some more detailed instructions, please? I am pretty new and cannot get it to work. |
Since this seems to be problematic for at least 3 users , we should check if we can find another way to do this. |
Yeah I actually did it for job and you have to patch the package to remove the post install. Curiously they basically just read the file and eval it instead of actually importing it so if you really want I guess you could include it just as a copy pasted file |
you add this in paraglide settings.json instead of the jsdelivr urls
and you have to install each of the ones you need as devDependency. To prevent them from executing scripts you can use pnpms |
Probably fixed by #461 ? @samuelstroschein |
No, i don't think this should have solved it. |
Adding context on why Paraglide JS fetching modules on the fly:
Fetching modules on the fly is annoying if issues like this one pop up. So what's the solution? Standalone You likely read this and think "but how do i store this in git then?". That is to be determined. Likely git ignoring the binary file and fetch it from a host/google drive on build is the way to go. Unfortunately, git is unsuited for anything binary and running in the browser, etc.. We learned this the hard way. |
i still believe it should be more straightforward/simple to use inlang plugins from npm. you could either make both ways first class citizens or change the internal/web usage to sth like esm.sh which even supports import maps. https://esm.sh/#docs. |
Why would esm.sh be better than the current approach? Inlang plugins are loaded from disk. If the plugin does not exist on disk, it's fetched from the link, written to the disk, and then loaded. The unexpected behavior for node devs comes from "why can't I npm install?". Answer: Because NPM install doesn't work in the browser, NPM is not used outside of node, and a dependency on NPM/Node is way to overkill for a file format. ESM.sh would always do HTTP imports and never read from disk. That seems inferior to the current approach? |
It's also |
But we are developing inlang for anyone in localization pipelines (designers, translators, product managers, developers, ...). NPM install and the package.json straight-up excludes the majority of people involved in localization. Even looking only at developers, only a small subset (NodeJS developers) use NPM installl/package.json. iOS Android, Flutter devs are all not using NPM. I just intended to provide context. We are not moving our decision to build a dependency on NPM. I understand that it's desirable for a minority of developer that use inlang. But, as mentioned, the long-term goal is to make an inlang file portable anyways with 0 dependency on node modules, package json, git, or anything else to make localization simple across everyone who is involved in localizing software. |
When creating a project using
bunx sv create new-project
and selecting the options below, the app doesn't run with errorENOENT: No such file or directory
This seems to be because the project doesn't include the files necessary inside
src/lib/paraglide
which are referenced in thevite.config.ts
file.After commenting the paraglide plugin and the references in the project it can properly start.
The text was updated successfully, but these errors were encountered: