Ошибка env-cmd: не удалось найти файл .env по пути - PullRequest
0 голосов
/ 17 апреля 2020

Кто-нибудь может мне помочь с проблемой .env-cmd?

env-cmd Ошибка: не удалось найти файл .env по пути: .env.development в getEnvFile C: \ Users \ Jake \ project \ fcmanager-frontend \ node_modules \ env-cmd \ dist \ get-env-vars. js

package. json file:

  "scripts": {
    "start": "env-cmd -f .env.development react-scripts start",
    "build": "env-cmd -f .env.development react-scripts build",
    "start-prod": "env-cmd -f .env.production react-scripts start",
    "build-prod": "env-cmd -f .env.production react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

1 Ответ

0 голосов
/ 20 апреля 2020

Попробуйте это.

    "scripts": {
    "start": "env-cmd -f ./.env.development react-scripts start",
    "build": "env-cmd -f ./.env.development react-scripts build",
    "start-prod": "env-cmd -f ./.env.production react-scripts start",
    "build-prod": "env-cmd -f ./.env.production react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
...