On my PC, where I run two projects in Android Studio – one for Flutter Client side and other for serverpod server, suddenly the Powershell under the server project started complaining about not finding any servpod cmdlets, eg, “serverpod generate” not found and I cannot build my executables.
C:>serverpod_server> serverpod generate
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- serverpod generate
-
+ CategoryInfo : ObjectNotFound: (serverpod:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I suspect, although I am not certain, it is related to a fix I had to undertake on the Client side. On the client side, while building the Flutter app (for mobile), I ran into missing “UnmodifiableUint8ListView not found“. To fix that required upgrading win32 package (flutter pub upgrade win32), which I duly completed (win32 version 5.5.4 from 5.5.0). After that I was able to proceed to build the app and it is working fine.
However, on the same host machine I also run the localhost server which is based on serverpod. After the above fix, anytime I use “serverpod generate” to get the server executable, the PowerShell in Android Studio, complains.
I have the following versions:
Windows: 10 Home 22#2
PowerShell: 5.1.19041.4780
Serverpod: 2.0.0
Flutter: 3.24.1
Dart: 3.5.1
I cannot return the win32 to old version as that will prevent build of the app. So I am really stuck.
Any help will be appreciated
I have tried running “serverpod generate” and other commands from a new shell, same problem
I have tried shutting down and restarting the project in Android Studio, same problem
I have ensured no multiple instances of shell are running
I have ensured $env:PATH for Powershell contains the serverpod_server in its path, still not able to locate and run “serverpod generate”
2