1
votes

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.

2
What? .g isn't how you globally install. yarnpkg is deprecated. I'd recommend finding a good tutorial. - jonrsharpe
OK, thanks. I started it recently. - Sándor Hatvani

2 Answers

3
votes

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.

1
votes

You should initiate a npm project first.

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