Projects and package.json

I have several projects, each project runs on a separate instance. They have different dependencies, for example 1 instance may use one particular 3rd party node. Can I branch that dependency out into the project's package.json? Everything I've done so far results in all dependencies go to root's package.json (shared across projects). The reason is one instance requires a package that is slow to load.

My experience does not match this doc:

Project Dependencies

Each project has its own package.json file that includes a list of node modules the project depends on. The Node-RED editor tracks what nodes you are using in a flow and helps you to keep that list of dependencies up to date.

Source:
Projects : Node-RED

So separate instances does not imply separate (installation/configuration) directories?
As far as I know one instance can only run one project at a time. You can configure multiple projects, and switch between them (that's why modules are installes at the instance level, not at the project level, the installation has to accomodate for all projects).
The dependencies in projects allow you to choose from the nodes installed at the instance level, and server, as stated a bit further in the documentation, as information when sharing flows. (not really usefull in my opinion)

We run multiple instances in docker containers, completely separate installation and configuration, and per instance only required nodes are installed. (actually, we copy the content of the /data/package.json in the project's package.json, and then create a symbolic link for the /data/package.json to the project's package.json)
That way the dependencies also get committed in the repository.
Same principle for other project specific files living outside the project's subdirectory (settings.js, .config.projects.json)

Thanks for feedback! Separate instances, then we wouldn't need the "projects" feature? We could do that, but then each instance would have its own repo. And how then to update shared content like Docker configuration, settings.js, node red config files etc?

For our use, I find that almost all root level content can be shared across all instances. Makes syncing updates easy. flows.json is separate in projects. But package.json would be nice to have separate. I guess the only way is as you do to separate root repo into individual repos. But that comes with other costs.

So you have one repo with 3 projects in it, and every instance starts one of the projects?
Downside is then indeed the sharing of the installed nodes across the instances...
Don't see how you can avoid having all required nodes for all projects active in every instance without tinkering with package.json files before you start the instances.
I think having only one repo limits you to one settings.js and one package.json containing the dependencies for all projects.