This is my solution:
It is better to do a backup:
sudo cp -arv pimatic-app/ pimatic-app.bak
Don’t delete the original-folder. Make a new installation in the original folder:
sudo npm install pimatic --prefix pimatic-app --production
npm shows a lot of warnings and errors (at the end), but it works.
It is not necessary to copy the ‘config.json’ and the datatabase-file ‘pimatic-database.sqlite’ from the backup to the live-folder. The new installation will use the config.json and the database.