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
{{ message }}
Repository navigation
create-migration does not work from non server directory #4430
We recently added support for running serverpod generate from any directory within the project. This change was done in the generator config's load factory. This factory is used by other commands such as the migration set of commands.
In a monorepo project, in the following scenarios where a root pubspec with name: _ may exist (pub workspaces):
[Expected] A project with a single _server directory such as a fresh project from serverpod create
We get the following error outputted:
Not a server package (_). Please make sure your server package name ends with '_server'.
[Bug] A project with multiple _server directories exist, such as a monorepo with the server and custom modules in a workspace configuration
We get the following error outputted:
Multiple Serverpod server projects found. Select one:(○) /path/to/foo/module/bar/bar_server(●) /path/to/foo/foo_serverPress [Enter] to confirm.Not a server package (_). Please make sure your server package name ends with '_server'.
To reproduce
See above description
Expected behavior
We should either:
Immediately fail without trying to resolve the server directory
(Preferred) we should allow all CLI commands to be run from any directory, taking advantage of the interactive server directory prompt
This should also be extended to other commands. All commands using GeneratorConfig.load will have this issue if we aren't using the resolved by GeneratorConfig.load.
Library version
Current main as of posting this issue / version 3.0.1
Platform information
N/A
Additional context
Tests for this should exist in tests/serverpod_cli_e2e_test/test
How experienced are you with this library?
Expert - Experienced and comfortable with using this library in complex projects
I see that there is something wrong but I don't understand the issue.
Is 1 under Describe the bug expected behavior? It looks like a bug to me.
I would say 2 is working as intended. If we have multiple Serverpod projects that exist and we start the search at a location where we can't unambiguously determine which project is intended, we should prompt the user for feedback.
Activity
SandPod commentedon Dec 12, 2025
I see that there is something wrong but I don't understand the issue.
Is
1under Describe the bug expected behavior? It looks like a bug to me.I would say
2is working as intended. If we have multiple Serverpod projects that exist and we start the search at a location where we can't unambiguously determine which project is intended, we should prompt the user for feedback.