Questions about using Electron

1.Quesion:Executing the command line 'npm run make' results in the error:Could not find module with name: @electron-forge/maker-squirrel,how to fix it?

   Answer:     If you are using Windows, this works for me:

    1. Run npm i electron-winstaller --save-dev --ignore-scripts

    2. Install _7zip x86_ in your computer. After installed, go to C:\Program Files (x86)\7-Zip and copy both 7z.dll and 7z.exe files to /path/to/your_project/node_modules/electron-winstaller/vendor if they are not still there.

    3. Run npx electron-forge import again

    4. Then try run npm run make again. I hope it works.

posted @ 2023-05-09 14:32  HelloMarsMan  阅读(50)  评论(0)    收藏  举报