create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

Error: spawn UNKNOWN

Open gilang-novrizal opened this issue 4 years ago • 32 comments
trafficstars

When I try to run a basics npx create-react-app i received this error

D:\>npx create-react-app abc
npx: installed 67 in 4.255s

Creating a new React app in D:\abc.

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 (internal/child_process.js:403:11)
    at Object.spawn (child_process.js:553:9)
    at spawn (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\node_modules\cross-spawn\index.js:12:24)
    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:407:19
    at new Promise (<anonymous>)
    at install (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:359:10)
    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:485:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Deleting generated file... package.json
Deleting abc/ from D:\
Done.

I'm using windows 10 version 20H2 and node v14.15.4.

gilang-novrizal avatar Mar 10 '21 03:03 gilang-novrizal

When I try to run a basics npx create-react-app i received this error

Shivamkosta avatar Sep 20 '21 07:09 Shivamkosta

When I try to run a basics npx create-react-app I received this error. I don't know how to solve it?

itshubham2710 avatar Oct 18 '21 17:10 itshubham2710

That happens when I try to make a React Project by: "npx create-react-app" command!

Arashcarryme avatar Nov 16 '21 06:11 Arashcarryme

When I try to run a basics npx create-react-app i received this error


D:\>npx create-react-app abc

npx: installed 67 in 4.255s



Creating a new React app in D:\abc.



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 (internal/child_process.js:403:11)

    at Object.spawn (child_process.js:553:9)

    at spawn (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\node_modules\cross-spawn\index.js:12:24)

    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:407:19

    at new Promise (<anonymous>)

    at install (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:359:10)

    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:485:16

    at processTicksAndRejections (internal/process/task_queues.js:93:5) {

  errno: -4094,

  code: 'UNKNOWN',

  syscall: 'spawn'

}



Deleting generated file... package.json

Deleting abc/ from D:\

Done.

I'm using windows 10 version 20H2 and node v14.15.4.

ColdJadedEyes08 avatar Nov 16 '21 18:11 ColdJadedEyes08

any solution ?

AhmedYounsi avatar Dec 01 '21 09:12 AhmedYounsi

anyone know solution ? how can i create react app? i am newbie???

TahirMehmood avatar Dec 13 '21 09:12 TahirMehmood

am also with this same mistake, online for a long time also did not find a way to solve, node reinstallation is useless, hope big guy extend a helping hand

preacher07 avatar Dec 28 '21 09:12 preacher07

i have same problem... i tried all answers from stackoverflow ( delete npm, npx cache), reinstall node.js, but i still have that problem

`

PS C:\Users\Admin\Desktop\study\portfoliosite> npx create-react-app my-app Need to install the following packages: create-react-app Ok to proceed? (y) y npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

Creating a new React app in C:\Users\Admin\Desktop\study\portfoliosite\my-app.

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\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\cross-spawn\index.js:12:24) at C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:390:19 at new Promise () at install (C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:341:10) at C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:468:16 at processTicksAndRejections (node:internal/process/task_queues:96:5) { errno: -4094, code: 'UNKNOWN', syscall: 'spawn' }

Deleting generated file... package.json Deleting my-app/ from C:\Users\Admin\Desktop\study\portfoliosite Done. PS C:\Users\Admin\Desktop\study\portfoliosite>

`

PS C:\Users\Admin\Desktop\study\portfoliosite> node -v v16.13.1 PS C:\Users\Admin\Desktop\study\portfoliosite> npm -v 8.3.0 PS C:\Users\Admin\Desktop\study\portfoliosite> npx -v 8.3.0

Matherss avatar Jan 04 '22 10:01 Matherss

I've had this problem, the solution is that I uninstalled the antivirus from my computer

wahyunandanovan avatar Feb 11 '22 02:02 wahyunandanovan

I've had this problem, the solution is that I uninstalled the antivirus from my computer

Same here

Raj-kishore avatar Feb 25 '22 18:02 Raj-kishore

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

AasifFiraz avatar Feb 26 '22 00:02 AasifFiraz

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

if there are other antivirus on your computer, try deleting them all.

wahyunandanovan avatar Feb 26 '22 00:02 wahyunandanovan

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

if there are other antivirus on your computer, try deleting them all.

No I don't have any other antivirus and also I tried everything. Nothing seems to work. I have been banging my head on this error for more than 2 days.

AasifFiraz avatar Feb 26 '22 01:02 AasifFiraz

first you need to run this script npm install -g create-react-app

after that run npx create-react-app my-app

rizwanullah313 avatar Mar 05 '22 17:03 rizwanullah313

I've had this problem, the solution is that I uninstalled the antivirus from my computer

moamen2020 avatar Apr 30 '22 10:04 moamen2020

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

joaovlev avatar May 23 '22 14:05 joaovlev

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

Hi, so I solved it by deleting Node modules from my local disk C and also the user folder. Removed everything related to npm. After that I restarted my computer and installed everything from scratch. Surprisingly it worked for me. Let me know how it goes

AasifFiraz avatar May 23 '22 14:05 AasifFiraz

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

Hi, so I solved it by deleting Node modules from my local disk C and also the user folder. Removed everything related to npm. After that I restarted my computer and installed everything from scratch. Surprisingly it worked for me. Let me know how it goes

Let me try it. I'm deleting my user folder. I'll back here in some minutes.

joaovlev avatar May 23 '22 14:05 joaovlev

If this still does not work clone a copy of the boilerplate code which is after you use npx create-react-app. Before I solved this I did this and worked for me. I'll send a GitHub boiler plate code Download you can use. Clone it and make sure to run npm install after u get the file on your computer to install all the modules, then run npm start and you will be good to go :)

AasifFiraz avatar May 23 '22 14:05 AasifFiraz

Have a look at this, it worked for me https://stackoverflow.com/a/72879257/15512430

Amitpandey241 avatar Jul 06 '22 12:07 Amitpandey241

try to delete your antivirus

kompargroup avatar Jul 11 '22 13:07 kompargroup

I already did everything mentioned above. I only have MS Defender antivirus. Do I have to delete it to?

peipakoa avatar Jul 18 '22 06:07 peipakoa

I already did everything mentioned above. I only have MS Defender antivirus. Do I have to delete it to?

No you don't have delete ms defender antivirus you need to disable it

Amitpandey241 avatar Jul 18 '22 06:07 Amitpandey241

just disabled it. I still experience the same error.

peipakoa avatar Jul 18 '22 07:07 peipakoa

just disabled it. I still experience the same error.

can we connect?

Amitpandey241 avatar Jul 18 '22 08:07 Amitpandey241

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

Amitpandey241 avatar Jul 18 '22 08:07 Amitpandey241

connect?

still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

peipakoa avatar Jul 18 '22 08:07 peipakoa

connect?

still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

is there an other antivires? can we have a meeting on google meet or something?

Amitpandey241 avatar Jul 19 '22 06:07 Amitpandey241

connect? still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

is there an other antivires? can we have a meeting on google meet or something?

real-time protection says i'm using other anitivirus provider but i've already uninstalled all besides ms defender. can you send the code for google meet?

peipakoa avatar Jul 19 '22 06:07 peipakoa

I had the same issue, I tried uninstalling and updating node and vscode but it didn't work.

and then I uninstalled the antivirus and restarted my PC, the problem solved

masoudmerzaye2020 avatar Sep 19 '22 04:09 masoudmerzaye2020