vscode-search-node-modules
vscode-search-node-modules copied to clipboard
How to search node modules in one step back parent folder
Hi, Currently we can search only node modules in workspaceFolder but how we can search in parent folder..where i want to change in extension.js? My project folder structure :
http://localhost/projects/mynodemodules/myproject
mynodemodules->folder [ http://localhost/projects/mynodemodules/ ]
- node_modules myproject->folder [ http://localhost/projects/mynodemodules/myproject ] -index.html -text.js -style.css
I am facing a similar issue.
I have the following structure ⸺
- root/
- project/
- index.js
- package.json
- node_modules
- README.md
I have opened root/
folder in VSCode & I entered Search node_modules
in search. It threw an error Search node_modules: No node_modules folder in this workspace.
Any ideas to solve this?
@deadcoder0904 : We can resolve easy,
getWorkspaceFolder().then(folder => folder && getProjectFolder(folder)).then(folder => { if (folder) { var f_path = path.join(folder.path, '../'); searchPath(folder.name, f_path, modulesPath); } });
@SaranSank PR might be more helpful :)
@deadcoder0904 : You are from india? You well in nodejs?
Yeah
I have one doubt in nodjs. How to read dir from server path. Example
var f_path = "http://hostname.com/ac/projects/nodepackages"; searchPath(folder.name, f_path, modulesPath);
You should ask such questions on StackOverflow. Never spam an issue.
But to answer your question, that is not the correct way unless your host is publicly accessible. Do it just as you do locally & then push to server & it should work.
I did in locally.But not working for server url. I have asked in stackOverflow but no answer
Try posting on reddit.com/r/nodejs
If you do not mind can you send me ur email id or any other mode to contact. That is very usefull to contact you. Here we can not discuss more
@deadcoder0904 : Are you there?