sindresorhus / wallpaper

Manage the desktop wallpaper
MIT License
1.05k stars 92 forks source link

cp.exec is not a function #35

Closed Sijoma closed 6 years ago

Sijoma commented 6 years ago

I get the following error when launching the wallpaper.get() function to retrieve the path of the current background image inside my components. It works from the electron process. Is it problematic that the linux.js is used even though I am on windows 10 at the moment?

grafik

sindresorhus commented 6 years ago

You cannot use this module in the Electron renderer process. Call it with remote.require instead. Also, make sure it's not run through Webpack. This applies in general to any Node.js-only module.