- Error: spawn powershell.exe ENOENT #150
- Comments
- MahmoudMabrok commented Oct 22, 2019
- MahmoudMabrok commented Oct 22, 2019 •
- kmaniruddin28 commented Aug 25, 2020
- thriftykapila commented Oct 16, 2020
- Sourabh42 commented Oct 27, 2020
- Problem with npm start (error : spawn cmd ENOENT)
- 5 Answers 5
- Not the answer you’re looking for? Browse other questions tagged node.js reactjs git-bash or ask your own question.
- Linked
- Related
- Hot Network Questions
- Subscribe to RSS
- Error: spawn ENOENT on Windows 8 #1
- Comments
- alexiskattan commented Jul 25, 2013
- tonny-zhang commented May 5, 2014
- aeastes commented Aug 10, 2015
- Error: spawn cmd ENOENT in VS code #1818
- Comments
- mishra1207 commented Nov 27, 2019
- lcampos commented Dec 30, 2019
- mishra1207 commented Jan 2, 2020
- Error: spawn /bin/cp ENOENT #1839
- Comments
- cmcodes1 commented Apr 8, 2020
- Description
- Expected Behavior
- Observed Behavior
- Environment
- brentvatne commented Apr 8, 2020 •
- celandro commented Apr 8, 2020 •
- 16oh4 commented Apr 9, 2020 •
Error: spawn powershell.exe ENOENT #150
Comments
MahmoudMabrok commented Oct 22, 2019
while executing npm-windows-upgrade i got
The text was updated successfully, but these errors were encountered:
MahmoudMabrok commented Oct 22, 2019 •
Complete solution is
- First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0 .
- open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force .
- last thing fire npm-windows-upgrade .
kmaniruddin28 commented Aug 25, 2020
- First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0 .
- open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force .
thriftykapila commented Oct 16, 2020
- First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0 .
- open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force .
- last thing fire npm-windows-upgrade .
this doesn’t solves the issue
Sourabh42 commented Oct 27, 2020
- First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0 .
- open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force .
Problem with npm start (error : spawn cmd ENOENT)
I have a problem with my application. Because before when I created an application it worked, but now, it shows me this error and I do not know why and the things I have to do to fix it.
Do you have any idea to help me ? (This is a reactJS app).
I checked some stackoverflow topics but everywhere I checked, it was not really an answer that worked.
5 Answers 5
Add C:\Windows\System32 to the global PATH environment variable.
Solution 1
Set your environment variable to C:\Windows\System32 . This works for me.
Solution 2
If the first one doesn’t work follow the 2nd steps. Navigate to your project folder and type this command >>>
Solution 3
Downgrade react-scripts in package.json file
I had the same problem after I tried to install Mongo DB. I found out that this problem only exists with react-scripts@3.0.0. Try to reinstall your npm with a different react script version. Simply go to your folder in command and reinstall like this:
After that the app worked for me again.
If someone hits this coming from Angular 2+, remove the —open from ng serve or run without this option.
For all those Who’ve come to this problem from react scripts not starting. The solution is
- Go to search bar and write environment variables. You should see an option to called edit system environment variables or something similar.
- Under the Advanced section there is a enivronment variable button. click it.
- After that you will see an option named path click on it.
- click add button and add following directory C:\Windows\System32 .
- close down your editor and restart your command terminal. Problem should be resolved now 😁
Not the answer you’re looking for? Browse other questions tagged node.js reactjs git-bash or ask your own question.
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Error: spawn ENOENT on Windows 8 #1
Comments
alexiskattan commented Jul 25, 2013
When I do this (I’m using coffeescript):
Any idea on if this can be fixed?
The text was updated successfully, but these errors were encountered:
tonny-zhang commented May 5, 2014
aeastes commented Aug 10, 2015
I managed to get this library working on Windows.
Its not great but ill share my solution.
I assume you have already downloaded unoconv from https://github.com/dagwieers/unoconv and installed it somewhere that tickles your fancy.
Add the folder you have installed unoconv to your PATH in system environment variables.
OK so pretty standard so far.
Next we mix things up a little bit:
go to the unoconv folder and change the filename «unoconv» to «unoconv.py»
(Windows doesnt like files without file types)
now a pretty good test from this point to make sure everything is working as it should is to start cmd
type: «unoconv.py -h»
You should now see the help file for the unoconv application.
Now the messy bit:
In Windows, the childProcess.spawn function (in Node) doesn’t like anything but exe files. This is painful for us Windows users. Some users have suggested using the childProcess.exec function but this has a return size limit of 200kB and is typically only used for scripts/programs that do not return data so I have come up with a band aid for the .spawn.
as spawn only wants to run exe files lets give it one to run!
See attached code to run the unoconv application via the cmd command.
Error: spawn cmd ENOENT in VS code #1818
Comments
mishra1207 commented Nov 27, 2019
Hi,
I am getting following error while running command- SFDX: Authorize an Org in VS Code:
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11) <
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn cmd’,
path: ‘cmd’,
spawnargs: [
‘/c’,
‘start’,
‘»»‘,
‘/b’,
‘https://login.salesforce.com//services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=13f03582c57b^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=0q6hC3VWjMYLBKGHzLGm8g-NkJORu5ASRMfbdxDRyT0’
]
>
Could you please help me on this?
I have checked my configs and seems to be good.
The text was updated successfully, but these errors were encountered:
lcampos commented Dec 30, 2019
@mishra1207 can you provide the following details on your setup:
- Salesforce CLI version
- OS version (e.g. Windows 10)
- Salesforce extensions for vscode version
If you are running on a Windows system I’ve seen similar errors happening when the System Environment variable PATH does not include the CLI’s path.
mishra1207 commented Jan 2, 2020
I was able to resolve the issue.
It was happening due to proxy settings in my company provided laptop. After removing them it started working.
Thank you for your response.
Error: spawn /bin/cp ENOENT #1839
Comments
cmcodes1 commented Apr 8, 2020
Description
Spawn error occured after running the command expo build:android
Expected Behavior
Project build for android.
Observed Behavior
Environment
Expo CLI 3.17.18 environment info:
System:
OS: Windows 10 10.0.17763
Binaries:
Node: 12.16.1 — C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 — C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.4 — C:\Program Files\nodejs\npm.CMD
npmPackages:
expo:
37.0.3 => 37.0.6
react:
16.9.0 => 16.9.0
react-native:
The text was updated successfully, but these errors were encountered:
brentvatne commented Apr 8, 2020 •
hello! can you please provide more information about your project? is it an expokit project? is it a bare project? what’s your app.json? what are the full logs of running expo build:android — this just shows the error that you see
celandro commented Apr 8, 2020 •
Im not sure if I am having the same issue or not, but I am getting the same error running expo eject on windows.
I have tried both google cloud shell with and without git-bash
The logs with debug are not helpful
Edit: This worked sometime around 3.13.X I upgraded expo and expo-cli recently and now it does not work
16oh4 commented Apr 9, 2020 •
@cmcodes1 @brentvatne @celandro I had the same problem on Windows 10, actually today. I had to use WSL to install Ubuntu and use bash to run the build. Here are the steps that I took based on the Expo documentation:
- Run this command in Powershell to enable Windows Subsystem for Linux (WSL):
- Restart your computer
- Download the Linux Distribution you want to use in Microsoft’s packaging here. (must be this ‘.Appx’ format)
I personally picked Ubuntu 18.04 although it shouldn’t matter. Click on one of these and download to a directory of your choosing:
Before installing it, make sure you have enough space in your C:/ drive!! I only had 500 MB and the installation errored out, and I could not find a way to specify the installation. I didn’t measure exactly, but it was more than 3GB after install.
Open a new Powershell again (you can use the one in VS Code) and navigate to the folder where the .Appx file you just downloaded is at.
Run this command in Powershell
- Once it is installed, you should see it popup in your start (home button):
Open it and wait for it to install, and make an account.
- Once it’s done, you need to install nodejs to run the expo-cli in the Linux shell. You will have to fetch the repository URL because apt-get installs nodejs version 4 by default. The following will install nodejs 13.
- Now test the build command
- Should work for you now!
Hope this little guide can save hours of head scratching for everyone!