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

Module not found: Error: Can't resolve 'fs' #52

Closed
dmatora opened this issue Nov 4, 2022 · 2 comments
Closed

Module not found: Error: Can't resolve 'fs' #52

dmatora opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
bug Something isn't working needs-info This bug cannot be triaged without more information

Comments

@dmatora
Copy link

dmatora commented Nov 4, 2022

When I add

import {getAuthStatus} from "node-mac-permissions";
const status = getAuthStatus('screen');

I get

Module not found: Error: Can't resolve 'fs' in '/Users/Shared/Pet/App/app-desktop/node_modules/bindings'
 @ ./node_modules/node-mac-permissions/index.js 1:20-39
@codebytere codebytere self-assigned this Nov 6, 2022
@codebytere codebytere added bug Something isn't working needs-info This bug cannot be triaged without more information labels Nov 6, 2022
@codebytere
Copy link
Owner

@dmatora in order to triage this further i need more information. I need to know

  • what operating system you're using
  • what version the OS is on
  • what version of this module you're running

I will also need a code sample I can run to reproduce the issue. The above code snippet does not suffice.

@dmatora
Copy link
Author

dmatora commented Nov 14, 2022

Solution was to use this inside main.ts instead of renderer of Electron app

@dmatora dmatora closed this as completed Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-info This bug cannot be triaged without more information
Projects
None yet
Development

No branches or pull requests

2 participants