Tensorflow.js save model using node
I got it working now with the help of the guys from tfjs over at github.
Basically you need to install only the the tfjs-node dependency:
npm i @tensorflow/tfjs-node
Then you can just require tfjs and it should work.
const tf = require('@tensorflow/tfjs');
require('@tensorflow/tfjs-node');
const model = tf.sequential();
model.add(tf.layers.dense({units: 1, inputShape: [1]}));
model.save('file://./model-1a');