help
help copied to clipboard
npx create-react-app my-app errors
Details
I am getting the below errors while running the command npx create-react-app my-app in Git bash terminal
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Program Files (x86)\Java\jre1.8.0_301
npm ERR! path C:\Users\Lenovo\OneDrive\Desktop\R
npm ERR! errno -4058
npm ERR! enoent spawn C:\Program Files (x86)\Java\jre1.8.0_301 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:
npm ERR! C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2022-06-26T09_43_32_861Z-debug-0.log
How to fix this error? please help
Node.js version
I am using 16.15.1. node version
Example code
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Program Files (x86)\Java\jre1.8.0_301
npm ERR! path C:\Users\Lenovo\OneDrive\Desktop\R
npm ERR! errno -4058
npm ERR! enoent spawn C:\Program Files (x86)\Java\jre1.8.0_301 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:
npm ERR! C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2022-06-26T09_43_32_861Z-debug-0.log
Operating system
Windows 11
Scope
Error while executing command npx create-react-app my-app
Module and version
create-react-app
npm ERR! syscall spawn C:\Program Files (x86)\Java\jre1.8.0_301
Seems like an npm installation or something else is trying to access an installed version of JRE (Java Runtime Environment) but none is installed, which can be downloaded and installed from here.
Although we can't really determine what is requiring an installation of JRE with the provided stacktrace.
I installed but still getting the same error
@AbhishekTesla , did you manage to solve it?