heroku-buildpack-dart icon indicating copy to clipboard operation
heroku-buildpack-dart copied to clipboard

Pub: command not found

Open maxpill opened this issue 2 years ago • 3 comments

remote: -----> Copy Dart binaries to app root
remote: -----> Dart cmd found at -rwx------ 1 u54379 dyno 40473040 May 24 09:46 /app/dart-sdk/bin/dart
remote: -----> Dart reports version: Dart SDK version: 2.17.1 (stable) (Tue May 17 17:58:21 2022 +0000) on "linux_x64"
remote: *** Found pubspec.yaml in /tmp/build_3c2b97e0/./api
remote: *** Running pub get
remote: /tmp/codon/tmp/buildpacks/19eae438cd2c24c0d0c9839b8cf39e357205c/bin/compile: line 43: pub: command not found
remote:  !     Push rejected, failed to compile Dart app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to Heroku-project.
remote: 

It seems like a problem with path to the Dart SDK. Im using Dart SDK version: 2.17.1 (stable).

maxpill avatar May 24 '22 09:05 maxpill

I have the same issue as well

Becca-Saka avatar May 25 '22 11:05 Becca-Saka

@maxpill I tried to figure out what was wrong, apparently the command has changed from

pub get -> dart pub get.

I forked this repo and made the adjustment. It worked on my side maybe you should try it out https://github.com/Becca-Saka/heroku-buildpack-dart

Becca-Saka avatar May 25 '22 13:05 Becca-Saka