You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Nitro v3 alpha as a Vite plugin (nitro/vite) and I've run into an issue with tasks CLI.
When Nitro runs as a Vite plugin, nitro task list and nitro task run fail with: Missing info file: node_modules/.nitro/nitro.dev.json (is dev server running?)
This makes sense - in Vite plugin mode, Nitro doesn't spin up its own dev server, so the .nitro/nitro.json file that the CLI relies on never gets created.
I know I can hit /_nitro/tasks and /_nitro/tasks/:name endpoints directly via HTTP as a workaround in dev, but my use case requires running tasks from the CLI - specifically for system initialization/installation steps that need to happen before the app is fully up and usable.
Am I missing something in the setup? Is there a way to make the CLI work in Vite plugin mode, or a recommended pattern for this kind of init workflow?
Any pointers appreciated. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Nitro v3 alpha as a Vite plugin (nitro/vite) and I've run into an issue with tasks CLI.
When Nitro runs as a Vite plugin, nitro task list and nitro task run fail with:
Missing info file: node_modules/.nitro/nitro.dev.json (is dev server running?)This makes sense - in Vite plugin mode, Nitro doesn't spin up its own dev server, so the .nitro/nitro.json file that the CLI relies on never gets created.
I know I can hit
/_nitro/tasksand/_nitro/tasks/:nameendpoints directly via HTTP as a workaround in dev, but my use case requires running tasks from the CLI - specifically for system initialization/installation steps that need to happen before the app is fully up and usable.Am I missing something in the setup? Is there a way to make the CLI work in Vite plugin mode, or a recommended pattern for this kind of init workflow?
Any pointers appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions