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

Error: Can't resolve 'fs' in '....\node_modules\electron' #2

Open
ting-dev-coder opened this issue Feb 17, 2022 · 5 comments
Open

Error: Can't resolve 'fs' in '....\node_modules\electron' #2

ting-dev-coder opened this issue Feb 17, 2022 · 5 comments

Comments

@ting-dev-coder
Copy link

Issue

in ./node_modules/electron/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\USER\Desktop\Ting\music-player\node_modules\electron'
in ./node_modules/electron/index.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\USER\Desktop\Ting\music-player\node_modules\electron'

Describe

when I import { remote } from 'electron', it showed the error, how to fix it?
If I need to set some settings that should be set in webpack.config.js, which file I can use?

@andotorg
Copy link
Owner

import fs after show error?

@ting-dev-coder
Copy link
Author

import fs after show error?

no, when I import { remote } from 'electron', it showed the error

@ting-dev-coder
Copy link
Author

anyone can help?

@andotorg
Copy link
Owner

@andotorg
Copy link
Owner

replace method: https://www.jianshu.com/p/3dc8309533e7

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