packager: electron-packager is not recognized as a cmdlet name (Windows)
I installed electron-packager, but I can not use it:
The term 'electron-packager' is not recognized as a cmdlet name......
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 19 (5 by maintainers)
Install electron and electron-packager globally:
This will install electron 1.4.15 and electron-packager 8.5.1 into your user folder, not in project folder:
or it can be some
Documents and Settings, anyway you dont have to bother about this folder and touch anything there.Delete if present
node_modulesfolder in your project folder. go in cmd. exe to your project folder:Dont use PS, use cmd.exe
npm install electron-packager -g npm install electron-packager --save-dev
Install both locally as well as globally will solve the issue
npm install electron-packager -g
Installing it globally resolved my issue. Thanks!
I use “npm build”: “scripts”: { “start”: “electron .”, “build” : “electron-packager . --all” }
worked perfectly, I had followed tutorial videos (youtube) but it did not work, followed his steps worked! Thank you very much 😃
Can you send the exact error message in CMD
You should also install electron itself locally:
It seems that you sytem path variable is dirty.
What is the output of
$env:PSModulePathin PS, and are all paths well escaped and delimitedAnd why are you building from PS as admin, and not as local user from cmd or with .bat file, just curious?
I used devDependencies, not work Used
npm install electron-packager --save-devfor installResult:
npm buildscreenshot (http://prntscr.com/e4m5ui)My Package.json