Robinfr / electron-react-typescript

Electron boilerplate with React, Redux, and TypeScript
MIT License
432 stars 85 forks source link

Error: spawn etc\\dist\7zip-lite\7z.exe ENOENT #11

Closed MichaelGatesDev closed 5 years ago

MichaelGatesDev commented 5 years ago

This boilerplate is really nice and works well but I get this error on starting. Any idea how to fix it?

{ Error: spawn D:\Dev\Programs\manny-the-mod-man\dist\7zip-lite\7z.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
    at onErrorNT (internal/child_process.js:406:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall:
   'spawn D:\\Dev\\Programs\\manny-the-mod-man\\dist\\7zip-lite\\7z.exe',
  path:
   'D:\\Dev\\Programs\\manny-the-mod-man\\dist\\7zip-lite\\7z.exe',
  spawnargs:
   [ 'x',
     'C:\\Users\\sparta\\AppData\\Roaming\\Electron\\extensions\\fmkadmapgofadopljbjfkapdkoienihi.crx',
     '-y',
     '-oC:\\Users\\sparta\\AppData\\Roaming\\Electron\\extensions\\fmkadmapgofadopljbjfkapdkoienihi' ] }
psongit commented 5 years ago

Setting

node: { __dirname: true }

on the webpack.base.config.js file should solve the issue

Refer https://webpack.js.org/configuration/node/#node__dirname

Robinfr commented 5 years ago

I'm assuming you've solved the problem by now. Let me know if you're still having issues.