codebytere / node-mac-permissions

A native node module to manage system permissions on macOS.
MIT License
177 stars 44 forks source link

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

Closed dmatora closed 1 year ago

dmatora commented 1 year ago

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 commented 1 year ago

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

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

dmatora commented 1 year ago

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