Skip to content

Error when running serverpod generate #2762

Closed

Description

@ChrisCRCB

Hi,
Firstly, thank you so much for making such an awesome framework! I love Serverpod with a passion! It has made many of the projects I work on a breeze.

Now for the issue: I got this while running serverpod, with or without the -w switch.

Yikes! It is possible that this error is caused by an internal issue with the Serverpod tooling. We would appreciate if you filed an issue over at Github. Please include the stack trace below and describe     
any steps you did to trigger the error.                                                                                                                                                                          
https://github.com/serverpod/serverpod/issues                                                                                                                                                                    
                                                                                                                                                                                                                 
PathNotFoundException: Directory listing failed, path =                                                                                                                                                          
'C:\Users\chris\src\talking_noticeboard\talking_noticeboard_flutter\linux\flutter\ephemeral\.plugin_symlinks\flutter_soloud\android\.cxx\Debug\3j3u5064\arm64-v8a\CMakeFiles\flutter_soloud_plugin.dir\33da5992842d4b024c1554ca2f93d5a0\src\soloud\src\audiosource\ay\*'                                                                                                                                                          
(OS Error: The system cannot find the path specified.                                                                                                                                                            
, errno = 3)                                                                                                                                                                                                     
                                                                                                                                                                                                                 
#0      _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:42:24)                                                                                                                          
#1      _Directory.listSync (dart:io/directory_impl.dart:228:5)                                                                                                                                                  
#2      findPubspecsFiles (package:serverpod_cli/src/util/pubspec_helpers.dart:20:24)                                                                                                                            
#3      performServerpodPackagesAndCliVersionCheck (package:serverpod_cli/src/serverpod_packages_version_check/serverpod_packages_version_check.dart:26:22)                                                      
#4      GenerateCommand.run (package:serverpod_cli/src/commands/generate.dart:45:20)                                                                                                                             
<asynchronous suspension>                                                                                                                                                                                        
#5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)                                                                                                                                       
<asynchronous suspension>                                                                                                                                                                                        
#6      BetterCommandRunner.runCommand (package:cli_tools/src/better_command_runner/better_command_runner.dart:140:7)                                                                                            
<asynchronous suspension>                                                                                                                                                                                        
#7      _main (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:58:3)                                                                                    
<asynchronous suspension>                                                                                                                                                                                        
#8      main.<anonymous closure> (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:32:9)                                                                 
<asynchronous suspension>                                                                                                                                                                                        
#9      main (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:29:3)                                                                                     
<asynchronous suspension>                                                                                                                                                                                        

Fixes

Running flutter clean in the talking_noticeboard_flutter directory didn't fix anything. I assumed that's where the error was, since it seems like it's something to do with the flutter_soloud package.

I've tried running flutter clean && flutter pub get in the client, flutter, and server directories, but no dice. I had to delete the whole directory, then clone from git again before serverpod generate would work.

Activity

  1. hampuslavin commented on Sep 20, 2024

    @hampuslavin
    Contributor

    Hi @ChrisCRCB! 👋
    Happy to hear Serverpod makes your work easier! 🎉

    Regarding your issue, it seems that for now you managed to fix, or? Is it possible to reliably reproduce it by using the package you mentioned?

    The error seems to be that the symlink in that folder is not found. It could be that Serverpod should ignore some folders in the findPubspecsFiles call if this is happens often.

  2. Isakdl commented on Sep 20, 2024

    @Isakdl
    Collaborator

    @ChrisCRCB Another question, did you run serverpod generate inside the talking_noticeboard_flutter or inside talking_noticeboard_server

  3. ChrisCRCB commented on Sep 20, 2024

    @ChrisCRCB
    Author

    Hi,
    Thank you both for the prompt replies.

    @hampuslavin I'm afraid I deleted the directory, and haven't seen the error since. Stupid really, I should have renamed it or something.

    @Isakdl I ran it from talking_noticeboard_server.

    I'm sorry I can't be more helpful.

  4. added
    enhancement
    and removed on Sep 20, 2024
  5. hampuslavin commented on Sep 20, 2024

    @hampuslavin
    Contributor

    Thank you for the additional info. I think we can refactor this code to be a bit more robust and not fail the generation when some system paths are not found 👍

  6. chrisnorman7 commented on Sep 21, 2024

    @chrisnorman7

    Hi,
    This is the at home version of @ChrisCRCB. I have amanged to get the same error. This time, I shall leave the broken repo lying around, in case it can be useful for further diagnosis.

    C:\Users\chris\src\mindspace\mindspace_server>serverpod generate                                                        
    Yikes! It is possible that this error is caused by an internal issue with the Serverpod tooling. We would               
    appreciate if you filed an issue over at Github. Please include the stack trace below and describe any steps you did to 
    trigger the error.                                                                                                      
    https://github.com/serverpod/serverpod/issues                                                                           
                                                                                                                            
    PathNotFoundException: Directory listing failed, path =                                                                 
    'C:\Users\chris\src\mindspace\mindspace_flutter\linux\flutter\ephemeral\.plugin_symlinks\flutter_soloud\android\.cxx\Debug\4027mg5p\arm64-v8a\CMakeFiles\flutter_soloud_plugin.dir\46207a75f13aecdd06779c8ab88efd1b\flutter_soloud-2.1.4\src\soloud\src\audiosource\*'                                                                                                  
    (OS Error: The system cannot find the path specified.                                                                   
    , errno = 3)                                                                                                            
                                                                                                                            
    #0      _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:42:24)                                 
    #1      _Directory.listSync (dart:io/directory_impl.dart:228:5)                                                         
    #2      findPubspecsFiles (package:serverpod_cli/src/util/pubspec_helpers.dart:20:24)                                   
    #3      performServerpodPackagesAndCliVersionCheck                                                                      
    (package:serverpod_cli/src/serverpod_packages_version_check/serverpod_packages_version_check.dart:26:22)                
    #4      GenerateCommand.run (package:serverpod_cli/src/commands/generate.dart:45:20)                                    
    <asynchronous suspension>                                                                                               
    #5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)                                              
    <asynchronous suspension>                                                                                               
    #6      BetterCommandRunner.runCommand (package:cli_tools/src/better_command_runner/better_command_runner.dart:140:7)   
    <asynchronous suspension>                                                                                               
    #7      _main                                                                                                           
    (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:58:3)         
    <asynchronous suspension>                                                                                               
    #8      main.<anonymous closure>                                                                                        
    (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:32:9)         
    <asynchronous suspension>                                                                                               
    #9      main                                                                                                            
    (file:///C:/Users/chris/AppData/Local/Pub/Cache/hosted/pub.dev/serverpod_cli-2.1.1/bin/serverpod_cli.dart:29:3)         
    <asynchronous suspension>                                                                                               
  7. chrisnorman7 commented on Sep 22, 2024

    @chrisnorman7

    I have discovered that deleting the directories windows\flutter\ephemeral and linux\flutter\ephemeral works for serverpod. You can recreate them with flutter create . afterwards.

    This may or may not introduce further Flutter problems, as I'm now getting others issues, and can't be sure they're not related.

    Cheers,

  8. added
    bug
    area: cli
    and removed
    enhancement
    on Jan 3, 2025
  9. self-assigned this
    on Feb 20, 2025
  10. moved this from Next 🌟 to Now 🔥 in Serverpod Frameworkson Feb 20, 2025
  11. moved this from Now 🔥 to Done 🚀 in Serverpod Frameworkson Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: clibug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions