Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to run because of ERR_INVALID_ARG_TYPE #13

Closed
SilentImp opened this issue Feb 4, 2019 · 2 comments
Closed

Failing to run because of ERR_INVALID_ARG_TYPE #13

SilentImp opened this issue Feb 4, 2019 · 2 comments

Comments

@SilentImp
Copy link

I am trying to run it in the same directory where .env are.

$ node -v
v11.9.0

$ dotenv
internal/validators.js:125
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at normalizeSpawnArguments (child_process.js:414:3)
    at Object.spawn (child_process.js:553:16)
    at spawn (/Users/silentimp/.nvm/versions/node/v11.9.0/lib/node_modules/dotenv-cli/node_modules/cross-spawn/index.js:17:18)
    at Object.<anonymous> (/Users/silentimp/.nvm/versions/node/v11.9.0/lib/node_modules/dotenv-cli/cli.js:26:1)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)

but it work with --p

$ dotenv -p REACT_APP_LOCALE
it

What has gone wrong?

@SilentImp
Copy link
Author

On 10 and 8 node version it also fails this way.
mac os x 10.14

@entropitor
Copy link
Owner

You need to call a command e.g. dotenv -- npm run test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants