futomi / node-sms-transceiver

The node-sms-transceiver sends and receives SMS messages via a GSM modem.
MIT License
13 stars 6 forks source link

TypeError: SerialPort is not a constructor #5

Open Abdurakxmon opened 1 year ago

Abdurakxmon commented 1 year ago

C:\Users\Room 423\Desktop\node_modules\node-sms-transceiver\lib\sms-modem.js:56 this._port = new SerialPort(path, { ^

TypeError: SerialPort is not a constructor

Node.js v18.16.0

nayookyaw commented 1 year ago

image

Same issue with me, Serial port is not a constructor

brunosantiago29 commented 1 month ago

C:\Usuários\Sala 423\Área de trabalho\módulos_de_nó\nó-transceptor-sms\lib\sms-modem.js:56 this._port = new SerialPort(caminho, { ^

TypeError: SerialPort não é um construtor

Node.js v18.16.0

const SerialPort = require('serialport')

has changed to;

const { SerialPort } = require('serialport') // or for esm import { SerialPort } from 'serialport'