sharetribe / flex-cli

Flex CLI

Home Page:https://www.sharetribe.com/docs/tutorials/getting-started-with-flex-cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

global installation with yarn does not work

Junkern opened this issue · comments

After installing the flex-cli via yarn (yarn global add flex-cli), the flex-cli command was not found.

Then I installed the cli with npm (npm install --global flex-cli) and it worked.

Thanks for reporting this!

I tried to reproduce this by removing the current global flex-cli installation, and adding a new with yarn global add flex-cli, and it seemed to work fine. I personally also prefer using NPM for global installations.

Which version of Yarn do you have installed? I still have 1.22.4.

I just tried it again, didn't work. I have yarn version 1.21.1

I tried this again with a fresh Yarn installation and still could not reproduce it.

For now, I suggest you just use the global package installed with NPM. I'll close this issue, but feel free to reopen it if you run into more problems.

I also encountered the same issue. Tried with yarn global add flex-cli which resulted in success but was unable to access flex-cli from command line.
Then re-ran yarn global add flex-cli but with sudo and it worked.

I would still recommend using NPM for global packages by default. However, we do mention Yarn in the README.

@shridharmanitripathi Do you happen to be running Windows? There's a specific note about the command not being found on Windows:

https://github.com/sharetribe/flex-cli#flex-cli-command-not-found-on-windows

@kpuputti I do get your point of using NPM over yarn. I was having issues with permission which was resolved with the use of sudo

Good that you got it solved.

For future reference to others, see this section in our docs if you run into this problem on Windows:

https://www.sharetribe.com/docs/flex-cli/getting-started-with-flex-cli/#flex-cli-command-not-found-on-windows