1

I have followed this tutorial step by step https://www.youtube.com/watch?v=K_kBzJN8pAY and I am 100% sure that I did everything correctly but unfortunately I am getting this error:

PS C:\MyApps\firstapp> flutter packages pub global run webdev serve webdev could not run for this project. You must have a dependency on build_runner in pubspec.yaml.

pubspec.yaml dev_dependencies: build_runner: >=1.6.2 <2.0.0 You must have a dependency on build_web_compilers in pubspec.yaml.

pubspec.yaml dev_dependencies: build_web_compilers: >=1.2.0 <3.0.0 You have a dependency on cupertino_icons which is not supported for

flutter_web tech preview. See https://flutter.dev/web for more details. You have a dependency on flutter which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details. You have a dependency on flutter_test which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details. pub finished with exit code 78

2
  • Please provide every CODE what you have tried. We are not going to see that tutorial, implement in our system and find a solution. After seeing proper code, other contributors will have proper idea what's the problem in error. Commented Feb 13, 2020 at 14:54
  • run this command( flutter channel ) in terminal and add the output. Commented Feb 14, 2020 at 5:18

2 Answers 2

1

If you follow that video exactly and did not change anything then you are on stable channel in flutter.

If You want to run flutter web then you have to move to beta channel.

Flutter web is under development, so it is only available on that channel.

check out here: https://flutter.dev/web

You can check channel by Following command.

flutter channel

you can see Following output.

Flutter channels:
* master
  dev
  beta
  stable

In Your case may be star is in front of stable.

Run Following command to move to beta channel.

Flutter channel beta

Now run following command to upgrade flutter.

flutter upgrade

Now You are good to go.

Sign up to request clarification or add additional context in comments.

10 Comments

Hello Viren,Thank you for your answer but unfortunately it did not work. You were right about me being on stable version.I followed your instruction Flutter channel beta to change to beta and i did the flutter upgrade but same :(
PS C:\MyApps\firstapp> flutter channel Flutter channels: master dev * beta stable PS C:\MyApps\firstapp> flutter upgrade Upgrading Flutter from C:\flutter... Already up to date. Flutter is already up to date on channel beta Flutter 1.14.6 • channel beta • github.com/flutter/flutter.git Framework • revision fabeb2a16f (2 weeks ago) • 2020-01-28 07:56:51 -0800 Engine • revision c4229bfbba Tools • Dart 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)
PS C:\MyApps\firstapp> flutter packages pub global run webdev serve webdev could not run for this project. You must have a dependency on build_runner in pubspec.yaml. # pubspec.yaml dev_dependencies: build_runner: >=1.6.2 <2.0.0 You must have a dependency on build_web_compilers in pubspec.yaml. # pubspec.yaml dev_dependencies: build_web_compilers: >=1.2.0 <3.0.0
You have a dependency on cupertino_icons which is not supported for flutter_web tech preview. See flutter.dev/web for more details. You have a dependency on flutter which is not supported for flutter_web tech preview. See flutter.dev/web for more details. You have a dependency on flutter_test which is not supported for flutter_web tech preview. See flutter.dev/web for more details. pub finished with exit code 78
Did you try after adding build_runner(simple dependency) ,(build_runner: >=1.6.2 <2.0.0 ,build_web_compilers)(dev dependency) and remove cupertino_icons dependency.
|
0

Nothing has worked for me. In order to use flutter and dart, I used Android Studio. It look like the problem is from Visual Studio Code. Thanks for your help, Jim

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.