Resolve node modules in parent directories #1542

Closed
opened 2025-08-09 17:20:32 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @geirsagberg on 6/28/2016

Currently, node modules like aspnet-webpack must be installed in the root directory of the web app.

When node modules (and package.json) are placed in a parent directory (e.g. a solution folder), node will still resolve packages correctly using require, but packages called via node services will fail to resolve the same packages.

If NodeServices could search up the directory tree like node does, it would be easier to share node packages between multiple web projects in a single solution.

*Originally created by @geirsagberg on 6/28/2016* Currently, node modules like `aspnet-webpack` must be installed in the root directory of the web app. When node modules (and package.json) are placed in a parent directory (e.g. a solution folder), node will still resolve packages correctly using `require`, but packages called via node services will fail to resolve the same packages. If NodeServices could search up the directory tree like node does, it would be easier to share node packages between multiple web projects in a single solution.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1542
No description provided.