Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawn (hardcoded)/macos-wallpaper ENOENT #81

Open
bumTomica opened this issue Mar 16, 2022 · 2 comments
Open

spawn (hardcoded)/macos-wallpaper ENOENT #81

bumTomica opened this issue Mar 16, 2022 · 2 comments

Comments

@bumTomica
Copy link

bumTomica commented Mar 16, 2022

Hello, using

  • electron (17.1.2) and
  • wallpaper (6.1.1)

When building dist with electron builder and running the app - the path to macos-wallpaper is for some reason hardcoded to the path of the local project of the device on which it was building.

The problem is the same with asar false and I tried to manually include wallpaper lib in dist and reference it in the project - it works locally but not after the build again.

I didn't even notice this before trying to run the app on another device where there is no locally saved dev directory with macos-wallpaper lib in the same place.

import { screens } from "wallpaper";
// ...
const currentMonitors = await screens();

Sentry error after running the build

Error
spawn /Users/bumtomica/Development/splashy-desktop/dist/wallpaper/source/macos-wallpaper ENOENT
// or
spawn /Users/bumtomica/Development/splashy-desktop/node_modules/wallpaper/source/macos-wallpaper ENOENT

Not sure if I'm doing something wrong with init or build, please advise.

@bumTomica
Copy link
Author

Going back to the 5.0.1 version it works. I need to include macos-wallpaper manually to dist folder - and dist is part of the build files. But when I do the same with 6+ version it uses the full hardcoded path.

@xrr2016
Copy link

xrr2016 commented Jun 1, 2022

Same issue, not working at mac. version 6.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants