The way the paraglide compiler get's called in NextJS projects is a bit of a hack. Internally it just calls the Paraglide CLI using exec_sync. This occasionally causes issues if the package manager can't locate the paraglide-js command.
It's currently done this way because the plugin needs to run from a CJS environment & doesn't have the opportunity to await anywhere.
Proposal
Remove the dependency on the CLI by instead spinning up a separate, ESM node process from the paragliden-next package via exec_sync. This would avoid any command-resolution issues
Context
The way the paraglide compiler get's called in NextJS projects is a bit of a hack. Internally it just calls the Paraglide CLI using
exec_sync
. This occasionally causes issues if the package manager can't locate theparaglide-js
command.It's currently done this way because the plugin needs to run from a CJS environment & doesn't have the opportunity to
await
anywhere.Proposal
Remove the dependency on the CLI by instead spinning up a separate, ESM node process from the
paragliden-next
package viaexec_sync
. This would avoid any command-resolution issues