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

package.json not used if in a different directory #23

Closed
usergit opened this issue Mar 29, 2018 · 4 comments
Closed

package.json not used if in a different directory #23

usergit opened this issue Mar 29, 2018 · 4 comments

Comments

@usergit
Copy link

usergit commented Mar 29, 2018

I currently have a directory structure like this

mainFolder
  subFolder
    assets
      logo.png
    main.js
  package.json

in main.js I have this code

click: () => openAboutWindow({ icon_path: join(__dirname, '/assets/logo.png'), copyright: 'Copyright (c) 2018 www.example.com', package_json_dir: join(__dirname, '..') })

but the generic electron icon is loaded without the attributes that are in package.json

if main.js is moved back to mainFolder, everything works as expected

@rhysd
Copy link
Owner

rhysd commented Mar 30, 2018

I could not find any problem with your code and my implementation.

Could you check this warning message here?: https://github.com/rhysd/electron-about-window/blob/master/src/index.ts#L21

If loading package.json failed, the warning should be shown in terminal because it is executed in main process.

@usergit
Copy link
Author

usergit commented Mar 30, 2018

that error message is not displayed in the terminal

@rhysd
Copy link
Owner

rhysd commented Mar 30, 2018

weird... In example, I used the same props and it works.

https://github.com/rhysd/electron-about-window/blob/master/example/main.js#L28-L33

Well, is the project in public? Or if it's just a trial, is it possible to send your project codes to me? (logo can be dummy because it's not related to this issue)
It's very important to reproduce the problem in my side.

@usergit
Copy link
Author

usergit commented Mar 31, 2018

after much trial and error I decided to start fresh, and everything works as expected. Thanks for the help

@usergit usergit closed this as completed Mar 31, 2018
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