toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

env-cmd crashes #352

Closed torgmash closed 1 year ago

torgmash commented 1 year ago

Hello Everyone:

I have a following error when I run env-cmd: Child process exited with code: 0 and signal:. Terminating parent process...

Version: "env-cmd": "^10.1.0"

env-cmd -f .env.dev --verbose -e dev react-scripts build Options: {"command":"react-scripts","commandArgs":["build"],"envFile":{"filePath":".env.dev"},"rc":{"environments":["dev"]},"options":{"expandEnvs":false,"noOverride":false,"silent":false,"useShell":false,"verbose":true}} Found environments: [dev] for default .rc file at path: ./.env-cmdrc

.env.dev file:

{
    "dev": {
        "env": "dev"
    }
}

npm version { npm: '8.19.1', node: '16.17.0', v8: '9.4.146.26-node.22', uv: '1.43.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '93', nghttp2: '1.47.0', napi: '8', llhttp: '6.0.7', openssl: '1.1.1q+quic', cldr: '41.0', icu: '71.1', tz: '2022a', unicode: '14.0', ngtcp2: '0.1.0-DEV', nghttp3: '0.1.0-DEV' }

torgmash commented 1 year ago

user error, the correct command was: env-cmd -f .env.dev --verbose -e dev react-scripts start