mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Electron-packager is not recognized as an internal or external command. #245
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vbmanuel22 on GitHub (Dec 26, 2018).
Hi,
I'm trying to build our Electron.NET app for windows and when I execute dotnet electronize build /target win on CLI, I always got this error
D:\WORK\AdminConsoleApp\AdminConsoleAppV2\AdminToolApplicationV2\obj\desktop\win>electron-packager . --platform=win32 --arch=x64 --out="D:\WORK\AdminConsoleApp\AdminConsoleAppV2\AdminToolApplicationV2\bin\desktop" --overwrite
D:\WORK\AdminConsoleApp\AdminConsoleAppV2\AdminToolApplicationV2\obj\desktop\win>
'electron-packager' is not recognized as an internal or external command,
operable program or batch file.
Please see below for reference.

Any help would be appreciated.
Thanks.
@robertmuehsig commented on GitHub (Dec 28, 2018):
This was wa mistake on my part - we updated the docs a couple of days ago: https://github.com/ElectronNET/Electron.NET#start-the-application
Instead of "dotnet electronize" you will just need to invoke it via "electronize ..."
@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Robert,
I had tried invoking it via "electronize" only and this is what I'm getting.

@GregorBiswanger commented on GitHub (Jan 4, 2019):
Hi @vbmanuel22,
did you try the new .NET Core SDK and the command
dotnet tool install ElectronNET.CLI -g?@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
Yes, after that the electronize command works, but I'm still having the same error when I'm creating a build for windows.

Thank you.
@GregorBiswanger commented on GitHub (Jan 4, 2019):
Works the
electron-packager --versioncommand?@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
Not sure what you mean. Do you mean the version of the electron-packager? Where can I find that? Is it the one in the package.json file?
@GregorBiswanger commented on GitHub (Jan 4, 2019):
No, try if the command works in the console..
@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
The command doesn't work.

@GregorBiswanger commented on GitHub (Jan 4, 2019):
Install electron-packager manually with the command and try again:
npm install -g electron-packager@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
Still doesn't work. See image below. Or should I move the cli.js on the folder of the app?

@vbmanuel22 commented on GitHub (Jan 4, 2019):
I found the electron-packager.cmd file on the other path. Shall I move it to the application folder?

@GregorBiswanger commented on GitHub (Jan 4, 2019):
Okay, the problem is: NPM can´t find the global path to the installed tools.
Often is this a problem with Visual Studio Node.js Tools and a seperate installed Node.js Version.
Try the following steps:
https://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows
@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
Okay I'll try those steps and will let you know the results.
Thank you for your help!
@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
After I installed the new version of node.js, I'm currently having a new error. Please see image below. Where can I see the environment variable?

@GregorBiswanger commented on GitHub (Jan 4, 2019):
delete the desktop directory from obj directory and try again please :)
@vbmanuel22 commented on GitHub (Jan 4, 2019):
Hi Gregor,
It works now. Thank you so much for your help.
Regards,
Vince
@GregorBiswanger commented on GitHub (Jan 4, 2019):
You're Welcome :) Thank you for using Electron.NET!
@Arslanijaz-009 commented on GitHub (Oct 8, 2019):
Hi Gregor




I have also same error on build. I applied every thing you described above. So my app build successfully but after build i can't get setup file except of this i get many folders and sub .dll files. And there is also a myapplication.exe file i run it but nothing happens.