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

doesn't properly work in Electron #760

Closed
pleerock opened this issue Aug 9, 2022 · 2 comments · Fixed by #761
Closed

doesn't properly work in Electron #760

pleerock opened this issue Aug 9, 2022 · 2 comments · Fixed by #761
Labels
need/triage Needs initial labeling and prioritization released

Comments

@pleerock
Copy link
Contributor

pleerock commented Aug 9, 2022

As we know in electron there two processes: renderer (browser) and main (node.js). When I use library in main process I expect it to behave the same way as I used in node.js. However it doesn't work this way and it requires "server" (I'm talking about createServer) to be created. Looks like it treats a main process as browser and tries to work like in a browser?

@pleerock pleerock added the need/triage Needs initial labeling and prioritization label Aug 9, 2022
@pleerock
Copy link
Contributor Author

pleerock commented Aug 9, 2022

Okay so looks like check

import { isNode } from 'wherearewe'

comes as false and remote is set to true by default. If we specify custom remote: false in options it works as expected.

pleerock added a commit to pleerock/js-ipfsd-ctl that referenced this issue Aug 9, 2022
Fixes ipfs#760; electron main process can be treated as node.js, so we don't need to use remote server.
achingbrain pushed a commit that referenced this issue Sep 2, 2022
Fixes #760; electron main process can be treated as node.js, so we don't need to use remote server.
github-actions bot pushed a commit that referenced this issue Sep 2, 2022
## [12.0.2](v12.0.1...v12.0.2) (2022-09-02)

### Bug Fixes

* make sure to behave as node.js in electron main process ([#761](#761)) ([9492643](9492643)), closes [#760](#760)
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

🎉 This issue has been resolved in version 12.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant