Skip to content
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

Error: spawn UNKNOWN #10670

Open
gilang-novrizal opened this issue Mar 10, 2021 · 32 comments
Open

Error: spawn UNKNOWN #10670

gilang-novrizal opened this issue Mar 10, 2021 · 32 comments

Comments

@gilang-novrizal
Copy link

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.

@Shivamkosta
Copy link

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

@itshubham2710
Copy link

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

@Arashcarryme
Copy link

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

@ColdJadedEyes08
Copy link

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.

@AhmedYounsi
Copy link

any solution ?

@TahirMehmood
Copy link

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

@preacher07
Copy link

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

@Matherss
Copy link

Matherss commented Jan 4, 2022

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 tar@2.2.2: 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

@wahyunandanovan
Copy link

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

@Raj-kishore
Copy link

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

Same here

@AasifFiraz
Copy link

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

@wahyunandanovan
Copy link

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.

@AasifFiraz
Copy link

AasifFiraz commented Feb 26, 2022

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.

@rizwanullah313
Copy link

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

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

@moamen2020
Copy link

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

@joaovlev
Copy link

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.

@AasifFiraz
Copy link

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

@joaovlev
Copy link

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.

@AasifFiraz
Copy link

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 :)

@Amitpandey241
Copy link

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

@kompargroup
Copy link

try to delete your antivirus

@peipakoa
Copy link

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

@Amitpandey241
Copy link

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

@peipakoa
Copy link

just disabled it. I still experience the same error.

@Amitpandey241
Copy link

just disabled it. I still experience the same error.

can we connect?

@Amitpandey241
Copy link

just disabled it. I still experience the same error.

can we connect?

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

@peipakoa
Copy link

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

@Amitpandey241
Copy link

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?

@peipakoa
Copy link

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?

@masoudmerzaye2020
Copy link

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

@mahsanr44
Copy link

Solved by uninstalling antivirus and VPN.
you should try doing this.

@DisaraMethmali
Copy link

:\Users\CE MO01\Downloads\react>npx create-react-app my-app
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Users\CE MO01\Downloads\jdk-20.0.1\bin
npm ERR! path C:\Users\CE MO01\Downloads\react
npm ERR! errno -4058
npm ERR! enoent spawn C:\Users\CE MO01\Downloads\jdk-20.0.1\bin ENOENT
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: C:\Users\CE MO01\AppData\Local\npm-cache_logs\2024-01-15T20_21_46_432Z-debug-0.log

please help me for resolved this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests