juicycleff / ultimate-backend

Multi tenant SaaS starter kit with cqrs graphql microservice architecture, apollo federation, event source and authentication
https://juicycleff.github.io/ultimate-backend-docs
MIT License
2.56k stars 404 forks source link

Error: unknown command "r" for "yq" #217

Open meodemsao opened 2 years ago

meodemsao commented 2 years ago

when i run command yarn setup:local log out put


Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-tenant
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-notification
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-role
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/api-admin
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-billing
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-access
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.
Registering 
**** apps/service-project
Success! Data written to: ultimatebackend/config/
Error: unknown command "r" for "yq"
Run 'yq --help' for usage.```
juicycleff commented 2 years ago

@meodemsao what version of OS are you using?

meodemsao commented 2 years ago

i using macos 11.5.1, yq 4.11.2

suadik commented 2 years ago

Please try replacing this in the register.sh in the script folder

SVC_NAME=$(yq r ./"${PROJECT_DIR}"/${BOOTSTRAP_PATH} 'service.name' )

with this

SVC_NAME=$(yq eval '.service.name' ./"${PROJECT_DIR}"/${BOOTSTRAP_PATH} )

Thank you

meodemsao commented 2 years ago

@suadik seem work well thank you, please create pull request

meodemsao commented 2 years ago

@suadik i have question, how to use yq on window I try using yq on window but seem hard to config env param like path

suadik commented 2 years ago

@meodemsao haven't run it on windows before.

guairedlein commented 1 year ago

the version 4 of yq have this problem, downgrade to 3.6