Couldn't find a package.json file in "C:\\Users\\Administrator\\Desktop\\yarn"

When starting the project, if it is installed using yarn, use the yarn serve command to start, if it is installed using npm, use npm serve to start, if this error occurs during startup

Couldn’t find a package.json file in “C:\Users\Administrator\Desktop\yarn”

We can do this

If you install using npm, execute the npm init command
Insert picture description here
If you install using npm , execute the yarn init command
Insert picture description here

Finally, close the terminal and reopen

Published 31 original articles · Liked4 · Visits 997

Guess you like

Origin blog.csdn.net/qq_43942185/article/details/105255638