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

后端 未结 12 710
鱼传尺愫
鱼传尺愫 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 05:59

    I had same problem,

    i tried below code

    env-cmd -f ./config/myvar.env
    

    its not working for me.

    Instead i add full path of config folder like below and its works like charm..!!!!

    env-cmd -f fullPath/config/myvar.env
    

提交回复
热议问题