I'm not quite sure I entirely follow the question, but I'm happy to try to answer (and also chat more directly over in the Reactiflux Discord where I usually hang out, if that's easier -
https://www.reactiflux.com , can ping me @acemarke in a channel like #general-tech ).
I'm sort of wondering if part of the confusion is seeing the name `node_modules`.
The `node_modules` folder _was_ originally created as the place for the NPM package manager to install packages that were, yes, _only_ for use inside the Node JS runtime.
_However_... in today's development world, _all_ libraries your app depends on, both for building the project _and_ for runtime behavior, get installed into the `node_modules` folder of a project. That includes libraries that _only_ run under Node, libraries that _only_ run in a browser, and libraries that can be used on either side.
So, think of the `node_modules` folder not as strictly "a place to install packages that only run under Node", but rather "a place to install _all_ packages used in this JS project, of any kind".
As an example: the React library is normally used for client-side rendering. If I do `npm install react`, it will get extracted to `./node_modules/react/`. I then do `import React from "react"` in my client-side only code, and a bundler like Webpack will end up adding the React library code to my final generated browser JS bundle when I run the build step.
On the other hand, you can _also_ use React on the server side as well, such as pre-generating HTML while handling an HTTP request, and you would again do `import React from "react"` in server-side code too.
At the same time, the Lodash utility lib (which is generic JS code that can be used anywhere) and the Webpack bundler (which is a build/dev-time only tool) would _also_ all get installed to their respective folders in `node_modules`, along with any other libraries they themselves depend on.
You might want to read through my "How Web Apps Work" series to see how some of these different pieces come together:
https://blog.isquaredsoftware.com/series/how-web-apps-work