Problem about saving data just use javascript in pavalovia

Description of the problem: When I want to do an online experiment,I find a problem in collecting data in pavalovia. My experiment codes are javascripts codes without Psychojs or jspsych. How could I get the csv data in pavalovia?
By the way, I have tried jspsych to make data collecting, codes as follows:
var timeline = ;
var pavlovia_init = {
type: “pavlovia”,
command: “init”
};
timeline.push(pavlovia_init);

  var pavlovia_finish = {
    type: "pavlovia",
    command: "finish"
  };
  timeline.push(pavlovia_finish);
  jsPsych.init({
    timeline:timeline,
    on_finish:function(){
      jsPsych.data.addDataToLastTrial({'xcollect':xcollect,'ycollect':ycollect, 'zcollect':zcollect, 'zcollectScaled':zcollectScaled});
      jsPsych.data.displayData();
    }
  })

However, there is an error called ‘[jspsych-pavlovia plugin 3.0.0] Error TypeError: Cannot read properties of undefined (reading ‘name’)’
How should I solve this problem ?