How can I fix this bug on create react app? Whenever I run command "npx create-react-app my-app --template typescript have error as shown in image"
in order for your node-webkit to be able to run this command, you must open your terminal with administrator access and then run the command.
So if you are on Windows, follow the steps below:
For Bash:
1-Right-click on the "on Windows" application and select Properties.
2-Under the Shortcut tab, click Advanced.
3-Select the Run as administrator checkbox and apply the changes.
for Command Prompt
Press the Windows Start button at the bottom left.
Type in "Command Prompt".
Right click on Command Prompt and click "Run as administrator".
Click Yes if the Windows 10 User Account Control prompt is displayed.
If you use vscode, just run the app itself with administrator permission:
If you're on Windows you can:
1-Right click the shortcut or app/exe
2-Go to properties
3-Compatibility tab
4-Check "Run this program as an administrator"
For more information, you can refer to the following links:
1-https://stackoverflow.com/a/30810320/17615078
2-https://stackoverflow.com/a/39948482/17615078
Related
I'm trying to create a React app, I just installed Node.js but the command npx create-react-app . doesn't work for some reason. Here is a screen shot from cmd:
variables variables pic
Your COMSPEC variable is messed up.
Press Win+R
Enter sysdm.cpl and click OK
Go to "advanced" tab
Click button "environment variables"
If there is a ComSpec or COMSPEC entry in the top list: Delete it
If there is a ComSpec or COMSPEC entry in the bottom list and it's not ending with cmd.exe: Change it to C:\Windows\system32\cmd.exe.
Click OK
Restart your computer
You should add your app name you forgot that:
npx create-react-app exercise
exercise: your app name
I have been vexed by what I felt should be an easy issue to solve. I have been trying to run the cmder executable from the start menu. But when I type the Cmder in the Run box, Cmder.exe does not show up in the list
But I can see from the cmd that Cmder.exe is present and when I run that exe in cmd , Cmder opens up.
Is there some reason that Cmder.exe does not appear in my start/run command?
Thanks in advance
The reason for this is that Cmder isn't installed like a typical Windows application.
The solution is to add Cmder to your computer's path. See Henrik Sommerfeld's blog post.
Additionally, if you're interested in learning more about what is being used for your searches, click the Filters button. See image below:
Instead of using the Start Menu, install Keypirinha. Then add the folder where you store Cmder and similar tools, to the Keypirinha and you can get rid of the Start Menu.
Keypirinha is faster and much more flexible than the Start Menu - e.g. let you pick the apps from somewhere on your machine.
I have a lot of XCopy-deployable tools like Cmder (and Keypirinha too) in an "Application" Git repository. If I have to provision a new developer machine with all the beloved developer tools, now the fast way is:
install Chocolatey
install Git Extensions via Chocolatey
clone my "Application" Git repository
This a done in less than 10 minutes and it covers 95% of my toolset.
To have CMDER on Windows Context Menu (right click) wherever you want.
Open a terminal as an Administrator
Navigate to the directory you have placed Cmder
Execute .\cmder.exe /REGISTER ALL
If you get a message "Access Denied" ensure you are executing the command in an Administrator prompt.
In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.
From: https://github.com/cmderdev/cmder#shortcut-to-open-cmder-in-a-chosen-folder
Tip: put the CMDER files in c:\Program Files\CMDER
I tried this
.save myShell.js
that is followed by this error:
Failed to save:myShell.js
why do I get this error ?
I save the situation with the start of the node.js command promt.
By windows install you get (so was after install on my sys) some several shortcuts , one with the node.js icon and it's name ist Node.js and another that is called Node.js command promt - if you want to use the .save command to save the session you must to run the "Node.js command prompt".
Of course with some more work you can get more.
Permissions issue.
2 options:
Run "Node.js" app as administrator (right click on the icon in the start menu "run as admin"
Run "Node.js Command Prompt" app and then type "node" which will put you in REPL
I installed Tortoise on Windows 10 (my user had admin privileges but installer wasn't ran as admin), and when trying to use any tortoise contextual menu, I was getting this error:
"TortoiseProc Launch failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail."
I verified, "run as Administrator" was not checked for TortoiseProc.exe file. I tried to check it, but this didn't change anything.
So I decided to uninstall it, and install it again. And then I was having this error:
a dialog saying the TortoiseProc.exe requires elevation
Now, when attempting to run the app by double clicking on TortoiseProc.exe, I got a prompt saying this app required privilege admin. Clicking on OK ran it properly. So I guess the prompt isn't displayed when calling it from a contextual menu, and it silently fails.
I fixed the problem by right clicking on TortoiseProc.exe file -> proporties. Then, on the Compatibily tab, I clicked on "Run compatibility troubleshooter". And voila! It fixed the problem: TortoiseProc.exe now runs, and does not ask any admin rights!
Run the Command prompt (cmd.exe) with admin rights and run this command:
SxsTrace Trace -logfile:SxsTrace.etl
Now run the Tortoise program which causes the SideBySide error.
Go back to the command prompt press ENTER to generate the SxsTrace.etl. Now type this:
sxstrace Parse -logfile:SxSTrace.etl -outfile:SxSTrace.txt
Now open the SxSTrace.txt trace and look which VC++ runtime is missing. Go to Microsoft.com, download and install the required version.
If you are unsure, please upload the complete SxSTrace.txt here.
I'm trying to learn Node.js. I really like a lot of the ideas I've seen. Currently, I have "Hello, World" working. To run hello world, I simply type node hello.js from a windows command prompt. Now, I'm trying to integrate Node in with Visual Studio as a Tool. Essentially, I want to be able to click the "TOOLS" menu in Visual Studio and choose "Node", and my currently selected file will run in a Node environment.
My question is, how do I do this? Currently, I have the following external tool configured:
Title: &Node
Command: C:\Windows\System32\cmd.exe
Arguments: node $(ItemFileName)
Initial Directory: $(ItemDir)
When I choose "Node" from the "TOOLS" menu, a command prompt window is opened. The directory is set to the directory of the file I've chosen. However, the command "node [filename]" doesn't get executed or entered. What am I doing wrong?
So I replicated the issue you've experienced so I've tried to simply point it to node.exe instead and seems to work pretty well ;)) Will probably end up using this as well!