[Solved] Error: Member not found: ‘packageRoot’ in Flutter

Today Just after the Flutter upgrade I am facing the following error Error: Member not found: ‘packageRoot’ in Flutter. So today in this tutorial we are going to learn all possible solutions for this error. Let’s get started with this article without wasting your time.

How Error: Member not found: ‘packageRoot’ in Flutter error occurs?

I was trying to run my flutter app and suddenly I get the following error in my stack track.

Error: Member not found: 'packageRoot'

How To Solve Error: Member not found: ‘packageRoot’ in Flutter?

  1. How To Solve Error: Member not found: 'packageRoot' in Flutter?

    To Solve Error: Member not found: 'packageRoot' in Flutter You Just need to upgrade flutter by running the following command: flutter channel stable Then, Run flutter upgrade Now, Your error must be solved.

  2. Error: Member not found: 'packageRoot' in Flutter

    To Solve Error: Member not found: 'packageRoot' in Flutter Just need to run flutter pub upgrade command that will upgrade your dependencies Or You can simply upgrade platform in your dependency_overrides Just like below in your pubspec.yaml file like this: dependency_overrides: platform: ^3.1.0 Now, Your error must be solved.

Solution 1: Upgrade flutter

You Just need to upgrade flutter by running following command.

flutter channel stable

Then, Run

flutter upgrade

Now, Your error must be solved.

Solution 2: pub upgrade

Just need to run flutter pub upgrade command that will upgrade your dependencies Or You can simply upgrade platform in your dependency_overrides Just like below in your pubspec.yaml file like this.

dependency_overrides:
  platform: ^3.1.0

Now, Your error must be solved.

Solution 3: Run Flutter Clean To solve Error: Member not found: ‘packageRoot’

Just Run these below two command lines at the root of your project.

flutter clean

Then run.

flutter pub get

Now, Your issue might be solved.

Conclusion

So, It’s All About This Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also, Check Out the Below Tutorials

Leave a Comment

  Canva Pro Crack Filmora Pro Crack Spotify Premium Free Download Tradingview Premium Free