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

Error: Invalid .rc file path. #77

Closed
kvedantmahajan opened this issue Jul 6, 2019 · 1 comment
Closed

Error: Invalid .rc file path. #77

kvedantmahajan opened this issue Jul 6, 2019 · 1 comment

Comments

@kvedantmahajan
Copy link

Here's my file .env-cmdrc

{
  "development": {
    "REACT_APP_NODE_ENV": "development",
    "REACT_APP_API_URL": "/local",
    "PUBLIC_URL": "/"
  },
  "staging": {
    "REACT_APP_NODE_ENV": "staging",
    "REACT_APP_API_URL": "/stage",
    "PUBLIC_URL": "/"
  },
  "production": {
    "REACT_APP_NODE_ENV": "production",
    "REACT_APP_API_URL": "/prod",
    "PUBLIC_URL": "/"
  }
}

And here's my start script

 "start": "env-cmd -e development node scripts/start.js ",

It fails with error

Error: Invalid .rc file path.
at Object. (/Users/xxx/.Trash/yyy/node_modules/env-cmd/dist/parse-rc-file.js:27:19)
at Generator.throw ()
at rejected (/Users/xxx/.Trash/yyy/node_modules/env-cmd/dist/parse-rc-file.js:5:65)

Same setup is being run in another project. Can't figure out why is this happening!

@kvedantmahajan
Copy link
Author

Happened due zsh shell holding onto old files of another project folder with same name.

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

1 participant