Netlify Dev not seeing my environment variables all of a sudden

Hi @hrishikesh

I’ve made some headway on this problem, but have managed to uncover what I think is the key issue…this error:

Exception has occurred: Error: ENOENT: no such file or directory, stat 'C:\Simon\code\deepsheet\client\build\.netlify\functions\auth'

My directory structure is such that I have my front-end React application in /client and the server side code in /serverLambda

Here is what my netlify.toml file looks like:

[functions]
  directory = "serverLambda/lambdaFunctions"
  node_bundler = "esbuild"

[build]
  command = "npm run build"  # this gets run in production to do the build
  publish = "client/build"

[dev]
  publish = "client/public"
  framework = "create-react-app"
  targetPort = 3000

My question is: is there something I can put in there to specify that the .netlify directory is at 'C:\Simon\code\deepsheet\.netlify (rather than 'C:\Simon\code\deepsheet\client\build\.netlify\functions\auth where it thinks it is) …?

Functions are resolved relative to base directory (which is current working directory by default). The behaviour you’re explaining is specific to your setup. Without seeing your repo, I can only guess so much.