1

I have installed this CLI - https://stacked.filledstacks.com/docs/getting-started/overview

The downloaded file is saved in this folder user/.pub-cache/global_packages

When I typed stacked create app my_first_app

I got this error -bash: stacked: command not found

I can see that I added the path when I typed echo $PATH

From my terminal:

echo $PATH

/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/alexa/opt/anaconda3/bin:/Users/alexa/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/Cellar/ruby/2.5.1/bin:/Applications/XAMPP/xamppfiles/bin:/Applications/XAMPP/xamppfiles/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/XAMPP/xamppfiles/bin:/Users/alexa/.pub-cache/bin:/Users/alexa/Developer/flutter/bin

this is the path I added :/Users/alexa/.pub-cache/bin:

My login shell is /bin/bash and I saved the path to nano ~/.bash_profile

6
  • so is the file in /Users/alexa/.pub-cache/bin or /Users/alexa/.pub-cache/global_packages ? Commented Jan 5, 2023 at 18:03
  • @flappix it is saved to /Users/alexa/.pub-cache/global_packages. I just changed the path to export PATH="$PATH":"$HOME/.pub-cache/global_packages" ...still got the same error Commented Jan 5, 2023 at 18:16
  • 1
    And in the directory you add to the path, you can see a file stacked with executable permissions? Commented Jan 5, 2023 at 18:19
  • @BenjaminW. I don't have a file named stacked in the path Users/alexa/.pub-cache/global_packages ...I do have a Unix Executable File named st_cli in the bin folder (/Users/alexa/.pub-cache/bin) Commented Jan 5, 2023 at 18:24
  • 1
    I don't know anything about stacked and how it's installed, but for any command (that isn't a built-in, an alias, or a function), there has to exist a file with the name you're using, with executable permissions, in your PATH. Commented Jan 5, 2023 at 19:19

1 Answer 1

0

I have fixed it...looks like the problem was I didn't install the latest version of the CLI because I was using an older version of the Dart SDK. My Dart SDK was updated but I had to remove the path referencing the older version of the Dart SDK.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.