Can't find the dfx.json file in the directory

I’m trying to run this command dfx start but it shows me the message “Cannot find dfx configuration file in the current working directory. Did you forget to create one?” and when I try to run this command 'dfx build" I have this message ‘Command must be run in a project directory (with a dfx.json file)’. So I guess I need to move dfx.json to the right directory (where my project is created) but I can’t find this file. I’m using macOS if it could help you

A dfx.json file should have been created in the project’s root directory by the dfx new <project_name> command? This root directory is also where you want to run dfx start from.

You could also create the file manually, any example project repo will include one for reference, this is a barebones example:, or try running dfx new to create a fresh project somewhere else and copy that.