You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate ps-list into an electron app that is then packaged using electron-builder.
Everything works fine on mac (both in development and packaged), things start to break only when I try to package the app on windows. Running the .exe will immediately trigger a "Cannot find module 'ps-list'" error.
I've tried excluding ps-list from the asar archive but it's still doesn't work.
When I disable asar completely everything works...
I've done a bit of digging into the code and my guess is the issue comes from the fact ps-list needs to run an executable (only on windows). To do so the executable must be outside the app.asar archive. But since ps-list uses __dirname to get the directory containing the executable, it's still looking at the app.asar/ directory instead of app.asar.unpacked/.
The text was updated successfully, but these errors were encountered:
I'm trying to integrate ps-list into an electron app that is then packaged using electron-builder.
Everything works fine on mac (both in development and packaged), things start to break only when I try to package the app on windows. Running the .exe will immediately trigger a "Cannot find module 'ps-list'" error.
I've tried excluding ps-list from the asar archive but it's still doesn't work.
When I disable asar completely everything works...
I've done a bit of digging into the code and my guess is the issue comes from the fact ps-list needs to run an executable (only on windows). To do so the executable must be outside the app.asar archive. But since ps-list uses __dirname to get the directory containing the executable, it's still looking at the app.asar/ directory instead of app.asar.unpacked/.
The text was updated successfully, but these errors were encountered: