Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"-bash: webdev: command not found" #32279

Closed
indigothm opened this issue May 8, 2019 · 21 comments
Closed

"-bash: webdev: command not found" #32279

indigothm opened this issue May 8, 2019 · 21 comments
Labels
platform-web Web applications specifically

Comments

@indigothm
Copy link

I am trying to get the web flutter running. Updated the bash_profile with export PATH="~/.pub-cache/bin:$PATH". Still doesn't let me run webdev returning "webdev: command not found". Any ideas how to address that?

@kevmoo kevmoo added the platform-web Web applications specifically label May 8, 2019
@Immortalin
Copy link

instead of ~ try <your flutter installation folder>/.pub-cache/bin

@indigothm
Copy link
Author

instead of ~ try <your flutter installation folder>/.pub-cache/bin

gives:
pub-cache/bin/webdev: line 7: dart: command not found

@loolooii
Copy link

loolooii commented May 8, 2019

I have the same problem and error. This does not work.

@indigothm
Copy link
Author

This worked for me:

FLUTTER_PATH=/Users/tikhomirovi/flutter/bin
PUB_CACHE_BIN=/Users/tikhomirovi/flutter/.pub-cache/bin
DART_PATH=/Users/tikhomirovi/flutter/bin/cache/dart-sdk/bin
export PATH=$PATH:$FLUTTER_PATH:$PUB_CACHE_BIN:$DART_PATH

@juanjoserodrigolazaro
Copy link

This worked for me:

FLUTTER_PATH=/Users/tikhomirovi/flutter/bin
PUB_CACHE_BIN=/Users/tikhomirovi/flutter/.pub-cache/bin
DART_PATH=/Users/tikhomirovi/flutter/bin/cache/dart-sdk/bin
export PATH=$PATH:$FLUTTER_PATH:$PUB_CACHE_BIN:$DART_PATH

where did you put this?

@loolooii
Copy link

loolooii commented May 8, 2019

@juanjoserodrigolazaro It worked for me too. The problem was the path should be relative to your flutter directory. Put it in .bash_profile in Mac. So, nano ~/.bash_profile and paste it there. Also run source ~/.bash_profile for changes to take effect without restarting terminal.

@loolooii
Copy link

loolooii commented May 8, 2019

Also, you'll need to install dev version of dart. Follow this link:
https://medium.com/@sagarsuri56/getting-started-with-flutter-web-e187829c9dd3

@juanjoserodrigolazaro
Copy link

Also, you'll need to install dev version of dart. Follow this link:
https://medium.com/@sagarsuri56/getting-started-with-flutter-web-e187829c9dd3

Thnaks! this helps a lot!

@AmbujaAK
Copy link

AmbujaAK commented May 8, 2019

Is there any solution for window user, I am getting the error after setting the path too.

@ghost
Copy link

ghost commented May 24, 2019

@AmbujaAK Try adding C:\Users\<Username>\AppData\Roaming\Pub\Cache\bin and C:\flutter\.pub-cache\bin and C:\flutter\bin\cache\dart-sdk\bin to your Path variable and it will solve the problem. If you are using VSCode use cmd or powershell terminal instead of git.

@androidovshchik
Copy link

Run this command in project folder

flutter packages pub global activate webdev

@chkkassd
Copy link

This worked for me:

FLUTTER_PATH=/Users/tikhomirovi/flutter/bin
PUB_CACHE_BIN=/Users/tikhomirovi/flutter/.pub-cache/bin
DART_PATH=/Users/tikhomirovi/flutter/bin/cache/dart-sdk/bin
export PATH=$PATH:$FLUTTER_PATH:$PUB_CACHE_BIN:$DART_PATH

Thanks,this worked for me, too.

@foxsofter
Copy link

Run this command in project folder

flutter packages pub global activate webdev

flutter pub global activate webdev

@papalardo
Copy link

This resolve with me.

export PATH="$PATH:$HOME/flutter/bin:$HOME/flutter/.pub-cache/bin:$HOME/flutter/bin/cache/dart-sdk/bin"

@Bikeman868
Copy link

For Windows users this worked for me:

pub global activate webdev

@nugi-developers
Copy link

@Bikeman868

pub global activate webdev

this worked for me, thanks

@ashilfree
Copy link

This worked for me:

FLUTTER_PATH=/Users/tikhomirovi/flutter/bin
PUB_CACHE_BIN=/Users/tikhomirovi/flutter/.pub-cache/bin
DART_PATH=/Users/tikhomirovi/flutter/bin/cache/dart-sdk/bin
export PATH=$PATH:$FLUTTER_PATH:$PUB_CACHE_BIN:$DART_PATH

Thx my friend

@mathiasgodwin
Copy link

This resolve with me.

export PATH="$PATH:$HOME/flutter/bin:$HOME/flutter/.pub-cache/bin:$HOME/flutter/bin/cache/dart-sdk/bin"

This works like magic... try it out fellas

@PeachBlack-Alba
Copy link

This resolve with me.

export PATH="$PATH:$HOME/flutter/bin:$HOME/flutter/.pub-cache/bin:$HOME/flutter/bin/cache/dart-sdk/bin"

This works like magic... try it out fellas

Where did you run this?

@mathiasgodwin
Copy link

mathiasgodwin commented May 5, 2021

This resolve with me.

export PATH="$PATH:$HOME/flutter/bin:$HOME/flutter/.pub-cache/bin:$HOME/flutter/bin/cache/dart-sdk/bin"

This works like magic... try it out, fellas

Where did you run this?

just add it to a new line in your ".bashrc", are you using an operating system other than Linux?
if not:

  1. open shell
  2. type nano .bashrc
  3. then paste it at the last line
  4. ctrl+s to save. sometimes you might have to reboot your pc, at least I had to do it for it to work

does this help?

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-web Web applications specifically
Projects
None yet
Development

No branches or pull requests