Open pe1uca opened 3 weeks ago
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 paraglide
rather than every add-on) and providing a link to a reproduction repo?
Same thing with minimal options selected, here's the link to the repo https://github.com/pe1uca/testSvCreate
┌ Welcome to the Svelte CLI! (v0.5.11)
│
◇ Which template would you like?
│ SvelteKit minimal
│
◇ Add type checking with Typescript?
│ Yes, using Typescript syntax
│
◆ Project created
│
◇ What would you like to add to your project? (use arrow keys / space bar)
│ paraglide
│
◇ Which languages would you like to support? (e.g. en,de-ch)
│ es,en
│
◇ Do you want to include a demo?
│ Yes
│
◇ Which package manager do you want to install dependencies with?
│ bun
│
◆ Successfully setup integrations
│
◇ Successfully installed dependencies
@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 pnpm dev
I got several errors like the following:
ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js":
ModuleImportError: Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js":
TypeError: fetch failed
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.
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. bun add complains about blocked postinstalls and the provided steps to solve those don't work either. Then I also do not know where I have to load the inlang plugins. Maybe I should abandon bun for the moment.
Since this seems to be problematic for at least 3 users , we should check if we can find another way to do this.
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. bun add complains about blocked postinstalls and the provided steps to solve those don't work either. Then I also do not know where I have to load the inlang plugins. Maybe I should abandon bun for the moment.
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
"modules": [
"node_modules/@inlang/message-lint-rule-empty-pattern/dist/index.js",
"node_modules/@inlang/message-lint-rule-identical-pattern/dist/index.js",
"node_modules/@inlang/message-lint-rule-missing-translation/dist/index.js",
"node_modules/@inlang/message-lint-rule-without-source/dist/index.js",
"node_modules/@inlang/message-lint-rule-valid-js-identifier/dist/index.js",
"node_modules/@inlang/plugin-message-format/dist/index.js",
"node_modules/@inlang/plugin-m-function-matcher/dist/index.js"
],
and you have to install each of the ones you need as devDependency. To prevent them from executing scripts you can use pnpms onlyBuiltDependencies
or neverBuiltDependencies
feature or just disable all post-install scripts (thats a safer environment but you might have some deps that depend on it working, put those in onlyBuiltDependencies then
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.