Access node_modules folder from a common folder in ReactJS


I’m learning ReactJS.

If I wanted to use a common node_modules folder in multiple projects (sort of like a “semi-global” folder if that makes sense), how would I get ReactJS to locate and utilize that folder?


Hi @Wally231

I don’t think npm has that capability, it’s either global or local (where the package.json file sits).

What is it you’re trying to achieve here? Theoretically if you install one version of an npm module in two different projects, they should be the exact same.

Hi Joe Smith,

If I move the package.json file to that “remote” folder (with node_modules), then would that be a problem?

THANKS for the response.

EDIT: I should add that I am using live-server to run the apps locally while I learn ReactJS.