I was trying to install dart2 recently, but when I try to install pub global activate stagehand
, it comes with a warning.
Warning: Pub installs executables into
$HOME/.pub-cache/bin
, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc
, .bash_profile
, etc.):
export PATH="$PATH":"$HOME/.pub-cache/bin"
so i went to my .bash_profile
file and added the above, and the file looks like this:
export PATH=/users/kevinau/dart/flutter/bin:$PATH
export PATH="$PATH":"$HOME/.pub-cache/bin"
but then I run webdev
and the command is still not found.
can anyone walk me thru how to fix this?
I tried echo $PATH
and return the below:
/users/myspace/dart/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/sbin/.pub-cache/bin
but how do I fix it?
pub-cache/bin, which is not on your path. You can fix that by adding this to your shell's config file (. bashrc, . bash_profile, etc.):
To find the path to pub , you can install dart with your . deb installation file, and open the synaptic package manager (type sudo synaptic from the command-line; install synaptic first, if it's not installed— sudo apt-get install synaptic ), find dart in the Synaptic Package Manager. Right click on dart .
I have just run the following command in my cmd
export PATH="$PATH":"$HOME/.pub-cache/bin"
then I again run the command dart pub global activate fvm
and the error is gone. In my case, I am having the error during installing fvm package.
Add C:\flutter\.pub-cache\bin
into your system variable path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With