You can use the node.js package manager, npm, which is provided by the node.js extension.
For example: $ tce-load -i compiletc python3.8 node.js
$ sudo npm install onoff
Note that this will install modules to /home/tc.
To install modules to /usr/local, you would have to set the copy2fs flag for node.js and install with "sudo npm -g"