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:
-
Run
npm i electron-winstaller --save-dev --ignore-scripts -
Install
_7zip x86_in your computer. After installed, go toC:\Program Files (x86)\7-Zipand copy both 7z.dll and 7z.exe files to/path/to/your_project/node_modules/electron-winstaller/vendorif they are not still there. -
Run
npx electron-forge importagain -
Then try run
npm run makeagain. I hope it works.
-

浙公网安备 33010602011771号