env-cmd error failed to locate ./.env file in gatsby?

后端 未结 12 711
鱼传尺愫
鱼传尺愫 2020-12-15 05:33

I have a file name .env.development in the root folder. I had install env-cmd as dev dependencies
when I start the server

  > npm run develop
         


        
12条回答
  •  一整个雨季
    2020-12-15 06:08

    In my case got this error :

    Error: Failed to find .env file at path: .env.local at getEnvFile (E:\project\....)

    Then i just rename .env.development file to .env.local and it is working fine.

    or if you are working on remote git repository then check you have pulled latest changes made by your team member to your local dev environment.

提交回复
热议问题