node-serialport icon indicating copy to clipboard operation
node-serialport copied to clipboard

SerialPort has no construct signatures.

Open AdroitBit opened this issue 11 months ago • 1 comments

SerialPort Version

12.0.0

Node Version

v18.16.1

Electron Version

No response

Platform

Microsoft Windows NT 10.0.22622.0 x64

Architecture

x64

Hardware or chipset of serialport

No response

What steps will reproduce the bug?

Run this code

// App.tsx import SerialPort from 'serialport'; function App() { return ( <>

fuck

<button onClick={function(){ const port = new SerialPort({ path: 'COM3', baudRate: 9600 }); }}>Test </>

); }

export default App;

What happens?

No button appeared and it seems there is the problem in browser's console.

The error in vscode says This expression is not constructable. Type 'typeof import("c:/Users/yanot/OneDrive/Desktop/small-CSI-Localization/csi_localization_full/node_modules/serialport/dist/index")' has no construct signatures.

The error in browser console says image

What should have happened?

The button "Test" appeared and no error should happened probably. but this code is to just to test serialport purely.

Additional information

No response

AdroitBit avatar Mar 11 '24 18:03 AdroitBit