-
Notifications
You must be signed in to change notification settings - Fork 107
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
How do I run this?(Node/NPM beginner) #92
Comments
Hi! Did you try logging tree? |
i get a null response when i try right now this is what i have in the app.js file |
this is what i am getting |
The lib also returns
See if that works. |
ok this worked so that I get JSON in the terminal, but types that are directory are only showing the children as an array... but not actually showing the objects in that array. this is really close to being what i need
How can i get the children as an array of objects? Im getting this as a console.log, but you mentioned i need to "run" dirTree.... im not sure what mean by "run". what is the script i should be using to run something like this and is it my app.js, or in the terminal?(really sorry about the noob questions, but if i try and figure this out on my own any longer, the computer is gonna learn how to fly) |
That's what I meant by running, what you did.
|
Please forgive me for this question, but I literally just started looking into node.js and NPM the directory tree > JSON is exactly what i need for a project at work. But how do I run this?
I installed Node.js and installed directory-tree, have a app.js and can see stuff in the terminal(console.log("Hello")).
Do i just copy the following into app.js and run it after i change the dirTree path?
const dirTree = require("directory-tree");
const tree = dirTree("/some/path");
When i have tried this the response is [Function: directoryTree]. will the JSON show up in the terminal?
again sorry about knowing nothing really but any help would be much appreciated
The text was updated successfully, but these errors were encountered: