无法在路径中找到 .env 文件:./.env.local
Failed to find .env file at path: ./.env.local
我正在编译我的 ReactJS 应用程序。它已经在根目录中注册了 env.local 个文件:
enter image description here
但是在 运行 npm start 执行“start”时:“env-cmd -f ./.env.local react-scripts start”,出现以下错误:
错误:无法在路径中找到 .env 文件:./.env.local
在 getEnvFile (C:\Users\source\repos\SRPV\SRPV.Web\SRPV.Web\srpv-web\node_modules\env-cmd\dist\get-env-vars.js:40:19)
enter image description here
这里还有什么问题?
提前致谢。
文件名需要以点开头。 “.env
”
我正在编译我的 ReactJS 应用程序。它已经在根目录中注册了 env.local 个文件:
enter image description here
但是在 运行 npm start 执行“start”时:“env-cmd -f ./.env.local react-scripts start”,出现以下错误:
错误:无法在路径中找到 .env 文件:./.env.local 在 getEnvFile (C:\Users\source\repos\SRPV\SRPV.Web\SRPV.Web\srpv-web\node_modules\env-cmd\dist\get-env-vars.js:40:19)
enter image description here
这里还有什么问题?
提前致谢。
文件名需要以点开头。 “.env
”