-3
As soon as I run the create-React-app command and create the project. at the end when I run the "Yarn start" command. follows the following error:
yarn run v1.22.4
warning package.json: No license field
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I’ve tried several things like deleting the node_modules folder, deleting Yarn.lock, deleting package.json, uninstalling and installing Node again. I don’t know what happened, because a day ago I was running the remote normally.
Try to rotate the command
yarn
in the project folder (just file Yarn, then the full command)– Pedro Augusto Null
Since it is a comment on my answer, do not create a new answer to the question, comment in my reply that you have already done so and yet it did not work. Take advantage and edit your question with more information and even add package.json, since the error message points to it.
– tvdias
I deleted the npm/Yarn folders from the machine and when I ran the create-React-app command it worked! I think there was some problem with those folders. As soon as I created a new React application, a new npm folder was installed on the machine and since then, I have had no problems. I appreciate all the suggestions! Thank you very much!
– Daniel Alves
Hello! It may sound silly, but I was having this same problem and all I did was close the program (vscode), and reopened. I made sure I was inside the correct project folder (web) and did the process again. It worked. In my case it was just lack of attention. I hope your problem is as simple as mine. Abraco!
– Thiago Bones
I had the same error, tried a few ways , but solved when I restarted Vscode.
– Guilherme Moura