mperitz / react-filetree-electron Goto Github PK
View Code? Open in Web Editor NEWA react component that renders an expandable/collapsible filetree in an electron app when given a directory string.
A react component that renders an expandable/collapsible filetree in an electron app when given a directory string.
It does not find any file, and because of that it does not renders.
Using electron 8.0.0 and react 16.12.0
I'm working with GatsbyJS. I have installed fs using $yarn add fs
However after compiling, the console gives the following error:
This dependency was not found:
* fs in ./node_modules/react-filetree-electron/src/filetree-min.js
To install it, you can run: npm install --save fs
✖ 「wdm」:
ERROR in ./node_modules/react-filetree-electron/src/filetree-min.js
Module not found: Error: Can't resolve 'fs' in '/home/prajwal/docgen/www/node_modules/react-filetree-electron/src'
@ ./node_modules/react-filetree-electron/src/filetree-min.js 32137:17-30
@ ./src/pages/fileSystemToYAML.js
@ ./.cache/sync-requires.js
@ ./.cache/app.js
@ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app
ℹ 「wdm」: Failed to compile.
What could be the issue?
Thank you for putting this up. This file tree really helps a project I'm currently working on. I use react redux with Electron in the project, I hardcoded my root directory path("./" or ".") and pass it to the file tree component. When I first run the project, nothing was displayed. I opened dev tool in electron and manually type in the root directory again, and that's when all the files showed up. I tried a couple of different things but still couldn't figure out why this is happening. It would be appreciated if anyone could help me out. Thank you!
Solution to this could be a hash map in global state that remembers all folders that get clicked on.
Not sure if this is still being maintained
This includes:
This is pretty open ended.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.