How to using 3.0.0 dart version?

#10 [6/9] RUN dart pub get



#10 0.566 Resolving dependencies...

#10 0.666 The current Dart SDK version is 2.18.0.

#10 0.666



#10 0.666 Because very_good_blog_app_backend requires SDK version >=3.0.0 <4.0.0, version solving failed.

#10 ERROR: process "/bin/bash -ol pipefail -c dart pub get" did not complete successfully: exit code: 1



-----

> [6/9] RUN dart pub get:

0.566 Resolving dependencies...

0.666 The current Dart SDK version is 2.18.0.

0.666

0.666 Because very_good_blog_app_backend requires SDK version >=3.0.0 <4.0.0, version solving failed.

-----



Dockerfile:19

-------------------

17 | # install phase

18 | COPY pubspec.yaml /app/pubspec.yaml

19 | >>> RUN dart pub get

20 |

21 | # build phase

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c dart pub get" did not complete successfully: exit code: 1



Error: Docker build failed
#10 [6/9] RUN dart pub get



#10 0.566 Resolving dependencies...

#10 0.666 The current Dart SDK version is 2.18.0.

#10 0.666



#10 0.666 Because very_good_blog_app_backend requires SDK version >=3.0.0 <4.0.0, version solving failed.

#10 ERROR: process "/bin/bash -ol pipefail -c dart pub get" did not complete successfully: exit code: 1



-----

> [6/9] RUN dart pub get:

0.566 Resolving dependencies...

0.666 The current Dart SDK version is 2.18.0.

0.666

0.666 Because very_good_blog_app_backend requires SDK version >=3.0.0 <4.0.0, version solving failed.

-----



Dockerfile:19

-------------------

17 | # install phase

18 | COPY pubspec.yaml /app/pubspec.yaml

19 | >>> RUN dart pub get

20 |

21 | # build phase

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c dart pub get" did not complete successfully: exit code: 1



Error: Docker build failed
I'm trying to deploy backend site using dart_frog, but current version is 2.18.0. How can I update sdk to 3.0.0 ?
9 Replies
Percy
Percy15mo ago
Project ID: ea4525e1-7b04-4853-b34c-e27b9f562316
dungngminh
dungngminhOP15mo ago
ea4525e1-7b04-4853-b34c-e27b9f562316
Brody
Brody15mo ago
try adding this nixpacks.toml file to your project
[phases.setup]
nixpkgsArchive = '78d1b099125d5db61cc0275fb366806156bf2e9e'
[phases.setup]
nixpkgsArchive = '78d1b099125d5db61cc0275fb366806156bf2e9e'
this should use dart 3.0.6 https://github.com/NixOS/nixpkgs/commit/78d1b099125d5db61cc0275fb366806156bf2e9e#diff-efd2d749dcdc66112977e9ab1f5ee01ffe31ddaba98eed2dfd05c91a29c21861R1
dungngminh
dungngminhOP15mo ago
I got the error in build log
#8 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix && nix-collect-garbage -d" did not complete successfully: exit code: 1

-----

> [4/9] RUN nix-env -if .nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix && nix-collect-garbage -d:

40.14 at /app/.nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix:3:12:

40.14

40.14 2|

40.14 3| let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/78d1b099125d5db61cc0275fb366806156bf2e9e.tar.gz";) { overlays = [ ]; };



40.14 | ^

40.14 4| in with pkgs;

40.14

40.14 (stack trace truncated; use '--show-trace' to show the full trace)

40.14

40.14 error: cannot get archive member name: truncated gzip input
#8 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix && nix-collect-garbage -d" did not complete successfully: exit code: 1

-----

> [4/9] RUN nix-env -if .nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix && nix-collect-garbage -d:

40.14 at /app/.nixpacks/nixpkgs-78d1b099125d5db61cc0275fb366806156bf2e9e.nix:3:12:

40.14

40.14 2|

40.14 3| let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/78d1b099125d5db61cc0275fb366806156bf2e9e.tar.gz";) { overlays = [ ]; };



40.14 | ^

40.14 4| in with pkgs;

40.14

40.14 (stack trace truncated; use '--show-trace' to show the full trace)

40.14

40.14 error: cannot get archive member name: truncated gzip input
I saw that https://github.com/NixOS/nixpkgs/archive/78d1b099125d5db61cc0275fb366806156bf2e9e.tar.gz is not found Any update in this
Brody
Brody15mo ago
well I tried
dungngminh
dungngminhOP15mo ago
hmmm, please help me in this if you have any idea
Brody
Brody15mo ago
I have no more ideas, I have never touched dart sorry
dungngminh
dungngminhOP15mo ago
That's alright. I will find another solution Thanks for your help @Brody I deployed it :)))
Brody
Brody15mo ago
awesome!!
Want results from more Discord servers?
Add your server