If you use `import` to import code, an error will be reported
fisheep01 opened this issue · 0 comments
fisheep01 commented
SerialPort Version
11.0.0
Node Version
18.12.0
Electron Version
21.4.4
Platform
No response
Architecture
x64
Hardware or chipset of serialport
No response
What steps will reproduce the bug?
// it will report an error
import { SerialPort } from 'serialport'
// it will work
const { SerialPort } = require('serialport')
What happens?
If you use import
to import the code, the above error will be reported
What should have happened?
I wish I could use import
normally to import the code as it would allow for better ts support
Additional information
No response