Forked from zyrong/vscode-node-modules with enhanced support for multi-level node_modules directory structure.
Hover the mouse over packageName in the package.json file and a related prompt will appear. If the package corresponding to this packageName is already installed, click the package name in the floating box, and it will jump to the installation directory of the package.
When importing package using import or require in .ts, .js, .jsx, .tsx, .vue files, move the mouse over the PackageName, you will get relevant tips.
In package.json file, press Ctrl and click packageName to jump to node_modules corresponding package directory.
Right-click the node_modules folder and click Search Package in the pop-up menu to search the node_modules packages.
In the pop-up menu, click Search node_modules to search the node_modules path.
This fork version enhances support for multi-level node_modules directory structure, suitable for the following scenarios:
When the project has nested node_modules structure (e.g., node_modules/package-a/node_modules/package-b), the extension automatically traverses upward to find dependency packages until the target package is found or the workspace root is reached.
Support in package-lock.json and npm-shrinkwrap.json:
- Parse nested package paths under
packagesfield - Parse hierarchical dependency relationships under
dependenciesfield - Automatically recognize
.package-lock.jsonfiles
Search Package feature supports pnpm's special directory structure:
- Packages under
node_modules/.pnpm/node_modules/
In monorepo projects, supports correctly resolving dependencies from sub-package directories, following Node.js module resolution rules to search upward.
| Feature | Windows | macOS |
|---|---|---|
| Search Package | Ctrl+K P |
Cmd+K P |
| Search node_modules | Ctrl+K N |
Cmd+K N |
| Setting | Default | Description |
|---|---|---|
node_modules.general.debug |
false |
Enable debug logging |
node_modules.hovers.pkgName.bundleSize |
true |
Show bundle size in hover tips |
node_modules.resolve.preserveSymlinks |
false |
Whether to preserve symlinks (not resolve to real paths) |
This project is forked from zyrong/vscode-node-modules. Thanks to the original author for the excellent work.





