Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
> react-lap@0.1.0 start
> react-scripts start

npm ERR! code ENOENT
npm ERR! syscall spawn pwsh.exe
npm ERR! path C:\Users\Administrator\Documents\frontend\react\my-app
npm ERR! errno -4058
npm ERR! enoent spawn pwsh.exe 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\Administrator\AppData\Local\npm-cache\_logs\2023-01-02T06_50_15_101Z-debug-0.log


What I have tried:

I am learning react as there was first step to install nodejs and after it needed to run some commands like npm npx node but my npx command didnt work
after that I searched for it but didn't get anything then proceed further and ignored it .
then , I needed to create a react app by using command "create-react-app appname" then it also didn't work and again I searched and created react app offline by using command ....
npm install -g create-react-app- offline
crao -n <app-name>
after that I need to run npm start then it showed me error ...then after a search I get to know that I need to change directory where the files are present as my files where inside my-app and my-app was inside react folder then I changed the directory ... still got the above error ... I watched many videos but I was not able to find the solution.
Posted
Updated 1-Jan-23 22:28pm

1 solution

enoent spawn pwsh.exe ENOENT

At a guess, npm is trying to run Powershell (the cross-platform version), but you do not have it installed. However, you need to check the complete log file as indicated in the error messages above.
 
Share this answer
 
Comments
Bharti Saiinii 2-Jan-23 5:01am    
how i will check the complete log file and in which way resolve my problem
Richard MacCutchan 2-Jan-23 5:19am    
Start by reading the log file to see if there are any significant messages in there that help.
Bharti Saiinii 2-Jan-23 12:46pm    
can you describe which log file where i will get it
Richard MacCutchan 2-Jan-23 12:49pm    
Can you not see the messages above?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900