I have Problem with finding a json file

My bad, forgot to mention one thing. Since you had:

I believe your functions are in the src directory? If yes, you should also change the functions directory here: Netlify App to src, or move your functions inside netlify/functions directory.

I change the Functions directory to src but still have the Page Not Found :cry:

Try reading your deploy logs for clues :slight_smile:

Specifically this line: Netlify App

It says your netlify.toml specifies the location as functions instead of src. You can remove that.

1 Like

so should I change it also in the netlify.toml to became like this?:

[functions]
  directory = "src"
  included_files = ["all/channels.json"]

It works Perfectly, Thank you soooo much for your support, I’m just wondering if I could only read from the file not write cause when I tried to update the JSON file content I got an error says:

Error: EROFS: read-only file system, open './all/channels.json'

Yes, you cannot write to files. If you wish to write, you need to use /tmp directory. For example, see this:

Thank you so much I really Appreciate your help, you made my day

The quoted line is not needed when loading a static json/pdf/image etc, it is needed when code is loaded I think.

This however is needed:
fs.readFile('./all/channels.json',..)

It works for me local and remote with a Lambda function.