Skip to content

fix constructor Error replaced with new sp(device, options)#38

Open
malekbenz wants to merge 1 commit intoemilsedgh:masterfrom
malekbenz:master
Open

fix constructor Error replaced with new sp(device, options)#38
malekbenz wants to merge 1 commit intoemilsedgh:masterfrom
malekbenz:master

Conversation

@malekbenz
Copy link
Copy Markdown

SerialPort don't conatin any sp.SerialPort contructor (module.exports = SerialPort;)
so this line:
modem.port = new sp.SerialPort(device, options);
should be replace with :
modem.port = new sp(device, options);

@adhisimon
Copy link
Copy Markdown

I confirm @malekbenz patch solve my problem

@mckoy03
Copy link
Copy Markdown

mckoy03 commented Aug 12, 2018

Hi,

what version of Node/npm you use? I can't seem to make it work on my environment. TIA

@jay-ike
Copy link
Copy Markdown

jay-ike commented Jul 1, 2022

Sorry but according to the API SerialPort the constructor of serialport is :
SerialPort({path,...})

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants