opral / inlang-paraglide-js

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

ignoring paraglide folder in git causes build fail in ci for nextjs #116

Closed NurbekGithub closed 1 month ago

NurbekGithub commented 1 month ago

This might not be an issue as I am not sure yet why nextjs plugin generates a .gitignore file that ignores everything in paraglide folder since the content of the folder is being used in the app?

Leaving it as it is causes build error in ci env: Module not found: Can't resolve '$paraglide/runtime.js'

removing the .gitignore solves the problem, but it is annoying since the plugin generates it again

LorisSigrist commented 1 month ago

Does the actual next build command fail in CI or are you running some sort of linting, typechecking or formatting first?

The next build command _should_ re-run the paraglide compiler so the paraglide folder should be regenerated when running it.

If you want to lint first you will need to first run the paraglide compiler via the CLI before linting

paraglide-js compile --project ./project.inlang --outdir ./src/paraglide
NurbekGithub commented 1 month ago

Sorry, didn't notice your response, will check and get back to you soon @LorisSigrist

NurbekGithub commented 1 month ago

The issue is somehow solved itself 😅 . Anyway, I think I will be able to solve it next time with

paraglide-js compile --project ./project.inlang --outdir ./src/paraglide

@LorisSigrist thanks!