npm install -g create-react-app, Why it is mandatory to write before creating any react project. If I globally install npm then why it is required to install npm another time for another folder or project.
It always shows the below error:-
npm ERR! enoent ENOENT: no such file or directory, open 'E:\AvatarDemo\AvatarDemoAwesome\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\NAFFY KAUSAR\AppData\Roaming\npm-cache_logs\2020-06-23T15_12_49_522Z-debug.log PS E:\AvatarDemo\AvatarDemoAwesome> npm install -g create-react-app C:\Users\NAFFY KAUSAR\AppData\Roaming\npm\create-react-app -> C:\Users\NAFFY KAUSAR\AppData\Roaming\npm\node_modules\create-react-app\index.js
- create-react-app@3.4.1 updated 1 package in 24.341s npm ERR! code ENOENT npm ERR! syscall open npm ERR! path E:\AvatarDemo\AvatarDemoAwesome\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'E:\AvatarDemo\AvatarDemoAwesome\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\NAFFY KAUSAR\AppData\Roaming\npm-cache_logs\2020-06-23T15_19_27_276Z-debug.log PS E:\AvatarDemo\AvatarDemoAwesome> create-react-app AvatarAwesome