Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SerialPort has no construct signatures. #2752

Open
AdroitBit opened this issue Mar 11, 2024 · 1 comment
Open

SerialPort has no construct signatures. #2752

AdroitBit opened this issue Mar 11, 2024 · 1 comment

Comments

@AdroitBit
Copy link

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
Copy link
Author

It seems to me. serialport is not usable at all?
console.log(serialPort); and the whole page is just dead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant