Search code examples
flutterdartdevtools

Invalid argument(s: A directory corresponding to fileSystemPath /Users/user/.pub-cache/hosted/pub.dartlang.org/devtools-2.9.2/build could not be found


Somehow the "build" directory doesn't exist within devtools-2.9.2 directory. I am getting this exception only while running the build on iPhone SE 2nd generation iOS 14.5 simulator though, which is weird. This began after an unexpected forced reboot of my mac. But I can not directly connect this event.

What is happening and how can I build this stuff or get rid of exceptions? And what is the cause?

flutter doctor -v No issues found


Solution

  • It seems like the new 2.9.2 release doesn't have the required "build" folder. You can try fixing it by running this in the terminal:

    dart pub global activate devtools -v 2.8.0
    

    which downgrades the version to 2.8.0 (that works fine). Answer from github.