Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. Error: Member not found: ‘packageRoot’ in a flutter. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
Table of Contents
How Error: Member not found: ‘packageRoot’ 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’?
- How to Solve Error: Member not found: 'packageRoot'?
To Solve Error: Member not found: 'packageRoot' You Just need to upgrade flutter by running following command: flutter channel stable then run flutter upgrade Now, Your error must be solved.
- Error: Member not found: 'packageRoot'
To Solve Error: Member not found: 'packageRoot' You Just need to upgrade flutter by running following command: flutter channel stable then run flutter upgrade 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: Flutter Clean
Just Run these below two command line in your root of your project.
flutter clean
Then run.
flutter pub get
Now, Your issue maybe solved.
Summery
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 Below Tutorials
- Error: No named parameter with the name ‘displayLarge’
- How to format DateTime in Flutter
- Android license status unknown. Run `flutter doctor –android-licenses` to accept the SDK licenses
- Your project requires a newer version of the Kotlin Gradle plugin
- TypeError: Cannot read properties of undefined (reading ‘app’)