Reputation: 1
when I run the following command to create a react app:
C:\WINDOWS\system32> npm i create-react-app -g hello
I get the following message in cmd:
npm WARN deprecated [email protected]: Use @hello/config instead
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
C:\Users\Simran Shivani\AppData\Roaming\npm\create-react-app -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\create-react-app\index.js
C:\Users\Simran Shivani\AppData\Roaming\npm\hello -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\cli\index.js
> [email protected] postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm WARN [email protected] requires a peer of glob@* but none is installed. You must install peer dependencies yourself.
+ [email protected]
+ [email protected]
added 379 packages from 242 contributors in 152.381s
What am I doing wrong?
Upvotes: 0
Views: 550
Reputation: 6837
Your command tries to install the packages create-react-app
and hello
globally, If you are using npm 5.2 or later there is no reason to install create-react-app
globally.
Use the recommended command to create your app instead,
npx create-react-app my-app
This command will get the latest version of create-react-app
and generate your project inside a folder name my-app
in your current working directory without installing create-react-app
globally.
Then you can change the working directory to my-app
and start the development server by running the command npm start
.
You can refer to the docs for more details.
Upvotes: 1