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

后端 未结 12 725
鱼传尺愫
鱼传尺愫 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:10

    Step 1: First run the command: npm install --save-dev env-cmd@10.1.0

    Step 2: Replace env-cmd .env-development gatsby develop with ./node_modules/.bin/env-cmd -f ./.env.development gatsby develop

提交回复
热议问题