Why doesnt this docker command wont work?

I’m trying to dockerize a bare-bones react file. In the terminal I typed
docker build -t sample:react-app
and I get the following error message: docker build" requires exactly 1 argument
so then I tried to put use a dot i.e.) docker build -t sample:react-app . then I get this error: failed to solve with front-end dockerfile.v0: failed to create LLB definition: dockerfile parse error line 1: FROM requires either one or three arguments so then I see this is a common issue with the new Docker Version via https://github.com/docker/buildx/issues/426 . So, does anyone know how to fix this? I tried typing export DOCKER_BUILDKIT=0 export COMPOSE_DOCKER_CLI_BUILD=0 into the cli but it didnt fix it.