BirjuVachhani / spider

A small dart library to generate Assets dart code from assets folder.
https://spider.birju.dev/
Apache License 2.0
190 stars 19 forks source link

Installation help #19

Closed CripyIce closed 4 years ago

CripyIce commented 4 years ago

Hi there, I can't seem to use this library.

  1. I've added spider: ^0.3.6 to my pubspec.yaml and hit Packages get.
  2. Open Terminal and running pub global activate spider command with the following error:
    bash: pub: command not found
  3. Tried also spider --help and got:
    bash: spider: command not found
amreniouinnovent commented 4 years ago

@CripyIce I found the solution 1- In your terminal nano .zshrc if you use zsh terminal 2-Add the path you will find in the warning message while activate spider 3-CTRL+O to save 4-CTRL+X to exit

Screen Shot 2020-03-26 at 10 43 00 PM
BirjuVachhani commented 4 years ago

@CripyIce You don't need to add it to your pubspec.yaml file. It is a command line app. You can install it using the pub command. If you're unable to run pub commands, checkout @amreniouinnovent 's answer.

CripyIce commented 4 years ago

It appears that I had to run flutter pub global activate spider because I followed the flutter installation guide and haven't installed dart separatley. Even after running the command and adding the export path to my shell config file I still had an issue with spider since it's trying to run internal commands using the dart command which is not recognized by Mac OS because as I mentioned above - I didn't installed dart on my mac since I installed only flutter.

What I did eventually is installing dart using Homebrew and everything went smooth.

I think that it should be mentioned that users using only flutter should install dart to get everything working.

Thanks for the help anyway!

amorenew commented 4 years ago

@CripyIce dart sdk is in Flutter folder Flutter_SDK\bin\cache\dart-sdk\bin

BirjuVachhani commented 4 years ago

@CripyIce Dart SDK already comes with Flutter installation. You just need to add it in your path. see @amorenew 's answer for the path.