Unable to run executable file for windows in electronJs - electron-builder

I am trying to generate .exe file for windows in electronJs. For this I am using electron-builder and electron-packager. when I run command(npm run package-win), It generates release-build folder inside root directory of project with .exe file but when I am trying to run this .exe file its throw an import error(screenshot attached) [https://i.stack.imgur.com/4UZtp.png][1]
As I explored and found that for this we can use "type": "module" in package.json or with script tag. I tried this solution but its giving another error (screenshot attached)
[ https://i.stack.imgur.com/18mku.png][1]

Related

How to run file watcher in virtual environment in GoLand?

I have enabled golangci-lint file watcher in GoLand but when I save file I got error like below one:
msg="Running error: context loading failed: no go files to analyze"
After some debugging I found that this error comes when I run golangci-lint without activating my virtual env.
So my question is how do I tell file watcher to run golangci-lint after activating virtual environment?
So, In summary I want this:
Before running any file watcher command, Run this command
source .my_virtual_env_folder/bin/activate
This command is basically activates virtual environment.
I am new to GoLand. I tried to do google search but no luck.
I found a workaround.
Make a executable file, write all the commands there. We have full control on which commands do we want to run and in which order. Then in file watcher "Program", paste the absolute path of this file.
I just wrote source <name_of_the_env>/bin/activate at the top of file and then wrote my main command.
This way it activated the virtual environment and then call the command.

Unable to locate jenkins.xml file within executable directory or any parents

I've installed jenkins on windows, and I wanted to use jenkins command to start and stop the program from anywhere in the system.
It turns out that after configuring jenkins and creating the environment variable I get the error below everytime I execute "jenkins start" from outside C:\Program Files (x86)\Jenkins.
Is there any configuration missing?
ERROR
System.IO.FileNotFoundException: Unable to locate jenkins.xml file within executable directory or any parents
at winsw.ServiceDescriptor..ctor()
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
SYSTEM ENVIRONMENT VARIABLES
JENKINS_HOME:
C:\Program Files (x86)\jenkins
Path:
%JENKINS_HOME%
You need to run your jenkins install jenkins.xml at the place where is your jenkins.xml
1 rename winsw.exe to jenkins.exe
2 cd c:/...where is your jenkins.exe
3 run jenkins.exe install jenkins.xml (both files must be in the same directory)
In Windows 10, the path of the configuration file (config.xml) is:
C:\ProgramData\Jenkins.jenkins
The Folder ProgramData is hidden, so go to the address bar and type or use the CLI.
Solution: Save your jenkins-agent file as xml format. not just jenkins-agent.xml
we can use notepad++ to save the xml type. similarly remove .exe at end of jenkins-agent.exe
Hope its useful.... cheers !!

Angular Console: Can't create library

I'm trying to create a new library using v 8.1.0 of the Angular Console on Windows. The error I get is "ENOENT: no such file or directory, mkdir "c:\path\to\my\workspace\libs\new_library_name"
"c:\path\to\my\workspace\libs" exists already
new_library_name folder should be created by Angular Console
The command run by the console is ng generate #nrwl/angular:library new_library_name.
I've tried different names/paths, running as administrator, running inside VSCode and in the standalone console. No luck with anything. This used to work.
Also, if I create the folder c:\path\to\my\workspace\libs\new_library_name and then run the console again, I get an error ENOENT: no such file or directory c:\path\to\my\workspace\libs\new_library_name\ReadMe.md. Of course the ReadMe doesn't exist - it needs to be created by the console.
What am I doing wrong or where to look?
Problem solved. I had turned on Controlled Folder Access in Windows 10 and mistakenly included my project folder as a controlled folder, which prevented applications (Angular Console, Yarn, etc) from writing to the folder. Removed it from Controlled Access and all is working again.

How can I make a batch file that runs an exe at startup by adding it to windows registry?

I got a python app, i compile it with pyinstaller and works perfectly, i got the file "MyApp.exe", but i want it to run at startup by adding the app to the registry, using the os.system module, that allows me to run batch commands.
How can I make a batch file that runs an exe at startup by adding it
to windows registry ?
Supposing that the exe is calles "MyApp.exe" and is located in D:\\Apps\, how can i get it done ?

Xamarin component.exe is not opening on Windows

I have downloaded the XPGK .zip archive to be able to upload my component to the Xamarin Store. I have done so by following the first step of this guide.
But when I click the .exe file a command prompt file just appears and disappears? What's the issue?
Did you follow the guide? It doesn't mention that you should click the .exe file to open it. Instead, the .exe file is used to generate the directory structure required for your component.
Use the xamarin-component.exe to create the base structure by typing the following into the console/terminal where is the base folder for your component.
Note: you will need to change the path to the location where you extracted the ".exe” file.
This means that you should first extract the .exe file to a directory where you want your solution to be placed (most likely your workspace).
Then, using a console/terminal, navigate to the directory in which you extracted the .exe file and type the following:
For Windows:
xamarin-component.exe create <foldername>
for OS X:
mono xamarin-component.exe create <foldername>
Where <foldername> is the name you want your directory to be.

Resources