-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I use volta to manage my node versions and package manager, this means that in a project that I use yarn, npm or npx is unaccessible, and vice-versa.
When trying to run the script with yarn,
"generate-client": "react-query-swagger /tanstack /input:https://localhost:7223/swagger/v1/swagger.json /output:src/api/axios-client.ts /template:Axios /serviceHost:. /use-recommended-configuration",
I get the following error:
I found the root cause inside the cli package being that the script is trying to run "nswag-portable" with npx thus, not being a valid command on my environment.
The fix is quite simple on my case, but unfortunately it is not propper for a production environment, so what I did was just fork and change to "yarn dlx nswag-portable"
But a more fitting fix, would be to detect the package manager, the version, and the correct way of running the nswag-portable, or to actually use nswag as a dependency of your project.
Metadata
Metadata
Assignees
Labels
No labels


