How to install node modules for external evaluation?


I was hoping for some extra clarity configuring additional modules for use in external evaluation, since there’s no mention of this in the the nodejs workflow.

It seems mathematica looks only at ~/.node_modules, so is it sufficient to simply generate a soft link?

cd ~; ln -s node_modules .node_modules 

In decreasing importance, here are some specific sub-questions:

  1. I prefer using yarn to manage required installations, do I have to use npm?
  2. Do npm installs need to be global or user?
  3. Does the fe or kernel need to be restarted; or evaluators re-registered after install or removal?

Knowing that any specific functionalities or modules will definitely not work (e.g. no browser …) would help, and any pro-tips from Javascript developers would be appreciated. For example, would it be possible to add a 'package.json' file for a notebook and isolate dependencies? I really don’t want these mma configuration steps to interfere with my existing node-js work.