'want to install react but facing spawn error
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Vishnu\react> npx create-react-app vikas
Creating a new React app in C:\Users\Vishnu\react\vikas.
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:412:11)
at Object.spawn (node:child_process:698:9)
at spawn (C:\Users\Vishnu\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\cross-spawn\index.js:12:24)
at C:\Users\Vishnu\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:407:19
at new Promise (<anonymous>)
at install (C:\Users\Vishnu\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:359:10)
at C:\Users\Vishnu\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:485:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}
Deleting generated file... package.json
Deleting vikas/ from C:\Users\Vishnu\react
Done.
PS C:\Users\Vishnu\react> npx create-react-app vikas
Solution 1:[1]
Follow the Following Steps.
open powershell/cmd and run.
npm cache clean --forceRun
npm cache verifyRun
npm install create-react-app vikasRun
npx create-react-app vikas
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rana Muhammad Usama |
