Importing csv file into a collection

I am trying to import data collection as per tutorial ‘How to import and export data collection’. I went through the whole process but it seems I have a coding error which I cannot figure out (I am a novice in coding …). See attached picture for illustration.


The yellow rectangle mentions ‘Parameter event is never used’ and the red circle shows ‘wixData is undefined’.

Can you please kindly assist me in solving this issue?

Thanks,

Hi,

In order to use the “wix-data” module, you need to import it first.
Add this line to the top of the code:

import wixData from 'wix-data';

For more information: https://www.wix.com/code/reference/wix-data.html