-
-
Notifications
You must be signed in to change notification settings - Fork 27k
I can't install react with npx create-react app #12650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would recommend going to your nodejs directory in program files and changing the following files: npm, npm.cmd, npx, npx.cmd. Over there, change and place prefix -g with prefix --location=global in the files. |
I continue the steps in your answers but the app of react don't create :( C:\Users\USUARIO\Desktop\REACT>npx create-react-app inicio Creating a new React app in C:\Users\USUARIO\Desktop\REACT\inicio. Installing packages. This might take a couple of minutes. Aborting installation. Deleting generated file... package.json |
Try referring to Issue #12185. |
Use a different network:Different Wi-Fi network or using a mobile hotspot.Then try again to create the react app, npx create-react-app <project_name> Hope this should help you.This Works For me. |
I can install react but for a weird reason this bug appear :(
npx create-react-app inicio
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead.Creating a new React app in C:\Users\USUARIO\Desktop\REACT\inicio.
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead.Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
Aborting installation.
Unexpected error. Please report it as a bug:
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:413:11)
at Object.spawn (node:child_process:700:9)
at spawn (C:\Users\USUARIO\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\cross-spawn\index.js:12:24)
at C:\Users\USUARIO\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:383:19
at new Promise ()
at install (C:\Users\USUARIO\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:334:10)
at C:\Users\USUARIO\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:461:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}
Deleting generated file... package.json
Deleting inicio/ from C:\Users\USUARIO\Desktop\REACT
Done.
The text was updated successfully, but these errors were encountered: