skip to Main Content
PS C:UsersARPITDesktop> npx create-react-app my-react-app
npm error code ENOENT
npm error syscall spawn C:WINDOWSsystem32cmd.exe
npm error path C:UsersARPITDesktop
npm error errno -4058
npm error enoent spawn C:WINDOWSsystem32cmd.exe ENOENT
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:UsersARPITAppDataLocalnpm-cache_logs2024-07-18T09_45_44_534Z-debug-0.log

I tried to change my environment path, reinstalled Node twice and searched for the solution in YouTube.

2

Answers


  1. •   Check and update the system PATH to include C:WINDOWSsystem32.
    •   Ensure cmd.exe is present in C:WINDOWSsystem32.
    •   Reinstall Node.js to reset PATH settings.
    •   Try running the command in a different terminal (PowerShell or Windows Terminal).
    •   Review and reset the npm configuration if necessary.
    •   Review the detailed log file for more information.
    •   Update npm to the latest version.
    
    Login or Signup to reply.
  2. If you would like to use react with JS, use the following boilerplate:

    Webpack react boilerplate

    If you would like to use react with typescript, use the following boilerplate:

    Webpack react typescript boilerplate

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search