Search code examples
node.jselectronelectron-packager

in electron.js npm start command not working.its saying electron is not recognise as internal or external command


operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Solution

  • i tried almost everything but finally i able to solved it .

    "electron-webpack-quick-start" setup everything for us we don't need to worry about installation of pacakges just run the command and have fun it worked for me.

    1. mkdir new-electron-webpack-project
    2. cd new-electron-webpack-project

      3.curl -fsSL https://github.com/electron-userland/electron-webpack-quick-start/archive/master.tar.gz | tar -xz --strip-components 1

    3. git clone https://github.com/electron-userland/electron-webpack-quick-start.git

    5.cd electron-webpack-quick-start

    1. rm -rf .git

    2. yarn

    8.yarn dev

    for more info read link below https://github.com/electron-userland/electron-webpack-quick-start