Visual studio code shows error on new p5 serial instance

hi,
while using a working p5 serial library and sketch in VS code ide i get error on the line:

serial = new p5.SerialPort();

error being:

Property 'SerialPort' does not exist on type '(sketch: object, node: string | object) => void'.ts(2339)

following is screenshot:

how can i solve this problem?

thank you