[英]How can i solve "No project found" error when installing react
I am new to react and i am taking my first course on openclassrooms on react.我是反应的新手,我正在参加关于反应的开放课堂的第一门课程。 The instructor is using the command
yarn global add create-react-app
讲师正在使用命令
yarn global add create-react-app
to setup but when i run the commdand i get the error below设置但是当我运行命令时,我收到以下错误
Usage Error: No project found in /E:/Web Dev/React/react-project
i have tried to use the command below that is provided in the react documentation but i stil get the same error我曾尝试使用反应文档中提供的以下命令,但我仍然遇到相同的错误
yarn create react-app my-app
How can i solve the problem i have looked up on the react documentation but still cannot find the solution.我如何解决我在 React 文档中查找但仍然找不到解决方案的问题。
I experienced the same issue and solved it as follows:我遇到了同样的问题并解决了以下问题:
npm uninstall -g yarn
npm uninstall -g yarn
从npm uninstall -g yarn
Before performing the above steps yarn --version
printed 2.0.0-rc.27
on my machine.在执行上述步骤之前,
yarn --version
在我的机器上打印了2.0.0-rc.27
。 Now it prints 1.22.4
.现在它打印
1.22.4
。
Having Yarn 2.x globally installed is discouraged accourding to Installation - Yarn 2.x .根据Installation - Yarn 2.x 的规定,不鼓励全局安装 Yarn 2.x。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.