You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"load-api-env-vars": "./node_modules/.bin/env-cmd -f ./packages/project-api/.env",
"api:start": "yarn load-api-env-vars nx run project-api:serve"
looking into the env-cmd bin file:
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
however, when I ran uname here's the result:
❯ uname
MINGW64_NT-10.0-22621
and even adding something like that, it's not working
case `uname` in
*MINGW64*) basedir=`cygpath -w "$basedir"`;;
esac
So I put a console.log to investigate a bit more:
❯ yarn load-api-env-vars
yarn run v1.22.19
$ ./node_modules/.bin/env-cmd -f ./packages/project-api/.env
getEnvVars options { envFile: undefined, rc: undefined, verbose: false }
Error: Failed to find .env file at default paths: [./.env,./.env.js,./.env.json]
at getEnvFile (C:\Users\user\work\fwd\node_modules\env-cmd\dist\get-env-vars.js:59:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.EnvCmd (C:\Users\user\work\fwd\node_modules\env-cmd\dist\env-cmd.js:39:15)
at async Object.CLI (C:\Users\user\work\fwd\node_modules\env-cmd\dist\env-cmd.js:19:16)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Looks like even specifying the "-f env-file-path", in the options it is still empty.
Thanks!
The text was updated successfully, but these errors were encountered:
I do believe this resulted from either one of two issues.
The usage of commander and how I parsed out provided arguments was wonky/hacky. I have since fixed that on master and soon v11 by now utilizing the supported -- separator between env-cmd args and the actual command to run with args. This separator I think also provides better readability and clarity on the command line.
I was not properly constructing paths between Windows/Unix pathing styles. I am now utilizing built-in node utils to help resolve/switch between windows/unix style pathing.
Feel free to give the current master a shot and see if that resolves your issues.
Hi folks, I know that it's likely an edge case, but any help would be great.
I'm using git bash on Windows 11
and installed zsh following this tutorial: https://dev.to/equiman/zsh-on-windows-without-wsl-4ah9 and almost everything is working fine
I have the following scripts on my package.json
looking into the env-cmd bin file:
however, when I ran
uname
here's the result:and even adding something like that, it's not working
So I put a console.log to investigate a bit more:
Looks like even specifying the "-f env-file-path", in the options it is still empty.
Thanks!
The text was updated successfully, but these errors were encountered: