'electron-packager' is not recognized as an internal or external command

后端 未结 6 1503
臣服心动
臣服心动 2021-02-05 16:43

I recently started using electron. I have successfully completed the 1st phase by creating a hello world app (included files index.html, main.js, package.json). Now I am trying

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 17:31

    There are two cases to make it work...

    1. As discussed above, install electron globally using -g,

      i.e. using npm install -g electron-packager

    2. Change in your package.json:

       "scripts": {
         "start": "electron-packager ."
       },
    

    Then type in the command npm start.

    This way it worked for me..

提交回复
热议问题