MAC OS - Node JS - Arduino - Can't find SerialPort Name.

Hello, I looked through he forum but I couldn't find an answer to this.

I am outputting JSON code with my Arduino and I can see it in the Arduino IDE Serial monitor.

My problem is that I am trying to get the JSON data with Node JS but I am not able to find what my MacBook Air's USB port name is, I seen tutorials for Windows and they usually get COM# .

I used the terminal command " ls /dev/ty* " and I did find my port which is " /dev/tty.wchusbserial1420 ". I tried entering it in my Node js code but to no avail and I don't know how to proceed.

Attached Below is the Node js code I am using. I got it from a stack overflow question, here.

const express = require("express");
const app = express();
const SerialPort = require('serialport');
const firebase = require('firebase');
const port = new SerialPort('wchusbserial1420',{
    baudRate: 9600
})

let Readline = SerialPort.parsers.Readline

let parser = new Readline()
port.pipe(parser)

parser.on('data', function(data){
    str = data.toString();
    str = str.replace(/\r?\n|\r/g,"");

    console.log(str.temperature);
    console.log(str.humidity);
})
const port = new SerialPort('wchusbserial1420',{
    baudRate: 9600
})

Have you tried using the complete path ("/dev/tty.wchusbserial1420") instead of what you think a name is?

Yes, I managed to get my hands on a windows laptop and I got it to work. I'll keep trying different configurations on MAC.

Alright, I have managed to get the right address working, appearently I had a spelling mistake somewhere, now the problem is that it's telling me that the PORT is busy.

(node:13568) UnhandledPromiseRejectionWarning: Error: Error: Resource busy, cannot open /dev/cu.wchusbserial1410

When I run the command " lsof | grep "/dev/cu.wchusbserial1410" " To see what is using the port I get that the Arduino is. " Arduino 6972 s 91u CHR 34,55 0t0 1437 /dev/cu.wchusbserial1410 "

Now I don't know how to proceed. I am still researching.

When I run the command " lsof | grep "/dev/cu.wchusbserial1410" " To see what is using the port I get that the Arduino is. " Arduino 6972 s 91u CHR 34,55 0t0 1437 /dev/cu.wchusbserial1410 "

So quit the Arduino application and try again.

Ohhh!!! That worked as a charm. Wonderful. THANK YOU SO MUCH!!