0
votes

$ yarn start yarn run v1.22.5 error Couldn't find a package.json file in "C:\Users\Anjana Poudel\Documents\Javascript\React.js\Projects-react" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ node -v v12.18.3 $ npm -v 6.14.6 $ yarn -v 1.22.5

1
you seem to be in the folder projects-react. Are you sure you dont have to cd into the acutal app folder? - The Fool
im not sure. do i need to? please tell - Anzana Poudel
I would assume but I cannot tell you because I dont know how your directory structure looks like. If you use something like react, you should know some terminal basics. Maybe watch a video or two on this. Find out what current directory means and what impact it has on the commands you run. - The Fool
@TheFool thanks it actually worked while typing command cd foldername and after running yarn start.Thank you so much! - Anzana Poudel

1 Answers

4
votes

You might have ran the command yarn start from the wrong folder. It might not have package.json

Usually when the new react app is installed into the system with npx create-react-app my-app, it creates the folder my-app in which all the react files reside. cd my-app command is required to run to access the files in the folder. Then yarn start or npm start will work.