Discussion:
[dart-misc] How to upgrade to Dart 2?
Niyazi Toros
2018-06-19 10:36:55 UTC
Permalink
Hi,

In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop 1
Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting this
error. Any help please?


Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/534b2880-d148-4ac8-b89a-ad621c279b55%40dartlang.org.
Rob Becker
2018-06-21 00:17:49 UTC
Permalink
Dart 2 isn't available on brew since the stable release of dart 2 is not
out yet. I've been just downloading and extracting the latest dart 2 from
the dev branch here <https://www.dartlang.org/tools/sdk/archive#dev-channel>
and putting it in my path before the other dart.
Post by Niyazi Toros
Hi,
In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop 1
Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting
this error. Any help please?
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/7b5db07a-9590-4867-b7ff-10f3d4b09f4c%40dartlang.org.
Matan Lurey
2018-06-21 00:23:07 UTC
Permalink
Post by Rob Becker
Dart 2 isn't available on brew
It is for me (https://github.com/dart-lang/homebrew-dart#dev-releases):

brew install dart --devel
Post by Rob Becker
since the stable release of dart 2 is not out yet. I've been just
downloading and extracting the latest dart 2 from the dev branch here
<https://www.dartlang.org/tools/sdk/archive#dev-channel> and putting it
in my path before the other dart.
Post by Niyazi Toros
Hi,
In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop
1 Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting
this error. Any help please?
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/7b5db07a-9590-4867-b7ff-10f3d4b09f4c%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/7b5db07a-9590-4867-b7ff-10f3d4b09f4c%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CACtdopjCVeTzUzR7EQE-cG3W7HH8h2e_15vfbBMRHjHroGTitA%40mail.gmail.com.
Patrice Chalin
2018-06-21 11:33:45 UTC
Permalink
Hi,

Sadly, it seems that brew assumes that all dev releases are older than
stable releases. That is why "brew install dart --devel" prints "Error:
dart 1.24.3 is already installed". To get around that, use the --force flag:

*> *brew upgrade dart --devel --force

==> *Upgrading 1 outdated package, with result:*

dart-lang/dart/dart 1.24.3 -> 2.0.0-dev.64.1

==> *Upgrading **dart-lang/dart/dart*

==> *Downloading https://storage.googleapis.com/dart-archive/channels/dev/release/2.0.0-dev.64.1/sdk/dartsdk-macos-x64-release.zip
<https://storage.googleapis.com/dart-archive/channels/dev/release/2.0.0-dev.64.1/sdk/dartsdk-macos-x64-release.zip>*

...

==> *Caveats*

Please note the path to the Dart SDK:

/opt/homebrew/opt/dart/libexec

==> *Summary*

[image: 🍺] /opt/homebrew/Cellar/dart/2.0.0-dev.64.1: 1,222 files,
372.9MB, built in 8 seconds

To switch between versions of dart use, for example:

*> *brew switch 1.24.3
Post by Niyazi Toros
Hi,
In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop 1
Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting
this error. Any help please?
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/57f784f2-bfee-47e3-b4fd-99264451bd8a%40dartlang.org.
Patrice Chalin
2018-06-21 11:35:52 UTC
Permalink
Post by Niyazi Toros
Hi,
In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop 1
Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting
this error. Any help please?
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/ee7aa976-f5be-4034-a2d8-81df637b2e99%40dartlang.org.
'William Hesse' via Dart Misc
2018-06-21 11:40:13 UTC
Permalink
Yes, the ***@2 and ***@1 formulas were added for exactly this purpose.
Until the first stable Dart 2 release is made, you must use the ***@2
formulat to get it, and after the first stable Dart 2 release is made, you
Post by Niyazi Toros
Post by Niyazi Toros
Hi,
In my macOS I have IntelliJ and setup dart and Flutter plugin. I develop
1 Flutter mobile app and I need to use Dart to create a web services for my
mobile app.
So, I need to install or upgrade to dart 2. But when I try I m getting
this error. Any help please?
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ brew tap dart-lang/dart
Niyazis-MBP:~ niyazitoros$ brew install dart
Warning: dart-lang/dart/dart 1.24.3 is already installed and up-to-date
To reinstall 1.24.3, run `brew reinstall dart`
Niyazis-MBP:~ niyazitoros$ brew install dart --devel
==> Installing dart from dart-lang/dart
Error: dart 1.24.3 is already installed
To upgrade to 2.0.0-dev.63.0, run `brew upgrade dart`
Niyazis-MBP:~ niyazitoros$ brew upgrade dart
Error: dart-lang/dart/dart 1.24.3 already installed
Niyazis-MBP:~ niyazitoros$ pub upgrade
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$ pub upgrade transmogrify
Could not find a file named "pubspec.yaml" in "/Users/niyazitoros".
Niyazis-MBP:~ niyazitoros$
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/ee7aa976-f5be-4034-a2d8-81df637b2e99%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/ee7aa976-f5be-4034-a2d8-81df637b2e99%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
William Hesse
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CAMQL4kjtvDiFt2uvRZeZPF47vy2Jh5NwA9BjG4T_GAKMXRUO_g%40mail.gmail.com.
Niyazi Toros
2018-06-21 13:28:28 UTC
Permalink
Thank you all. I upgraded to Dart2 using Patrice Chalin suggestion (*> *brew
upgrade dart --devel --force).

I am new to Dart, and I am trying to write Dart Web Api to connect internal
socket api so my Flutter up securely can access it.

This is my first step, and I have to take many more.

Kind Regards
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/114ae802-0513-4211-9579-ba2c5d4f6d9c%40dartlang.org.
Continue reading on narkive:
Loading...