Sándor Hatvani
Sándor Hatvani

Reputation: 465

Reactjs, yarn etc

I want to create a test React apllication but I am stuck at the installation: I install Yarn with npm because the yarn msi doesn't start, so:

1. npm i .g yarnpkg
2. yarn create react-app test

and I read this error message:

yarn create v0.15.1 error Couldn't find a package.json (or bower.json) file in C:\Users***\React at C:\Users***\AppData\Roaming\npm\node_modules\yarnpkg\lib\config.js:355:13 at Generator.next () at step (C:\Users***\AppData\Roaming\npm\node_modules\yarnpkg\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30) at C:\Users***\AppData\Roaming\npm\node_modules\yarnpkg\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:13 info Visit http://yarnpkg.com/en/docs/cli/create for documentation about this command.

I tried to search it on Internet but they did not solve my problem. Please, help me.

Upvotes: 1

Views: 879

Answers (2)

ludwigfriborg
ludwigfriborg

Reputation: 136

To anyone visiting this thread in 2021, it's very likely you're running yarn create-react-app my-app instead of yarn create react-app my-app.

Upvotes: 6

jgoday
jgoday

Reputation: 2836

You should initiate a npm project first.

cd projectfolder
npm init
yarn create react-app my-app

Upvotes: 1

Related Questions