Skip to content Skip to sidebar Skip to footer

Way To Read Filenames From Directory And Output To Json With Electron & React

I'm trying to make a music player application with Electron & React. I have been able to access music files in a resources/music folder when built and installed but I have to g

Solution 1:

Solved, after hours of looking (im pretty new to react and electron),

I used the below instead of vanilla fs import and it worked!

const remote = window.require('electron').remote;
const electronFs = remote.require('fs');
const electronDialog = remote.dialog;

Thanks for your comments to look at window.require

Post a Comment for "Way To Read Filenames From Directory And Output To Json With Electron & React"