I get a reference error to my client id.
code :
const app = dialogflow( {
clientId : XXXXXXXXXXX-XXXXXXXXXXXX1.apps.googleusercontent.com,
debug : true,
});
Try adding quotes around your client ID. The error tells you that a variable is not defined, so most likely it is trying to look for a variable with the same name as your client id because you haven't defined it as a string.
clientId : "XXXXXXXXXXX-XXXXXXXXXXXX1.apps.googleusercontent.com",