Node.js Deployment via SSH to EC2 Linux

Hi Everyone! I am trying to deploy a node.js app. I am trying to ssh into EC2 Linux instance and installing node.js, running npm install and npm start. I don’t understand what the error is telling me here. Below is my error. Can anyone assist?

#!/bin/bash -eo pipefail
sudo curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
tput: unknown terminal "unknown"

## Installing the NodeSource Node.js 14.x repo...


## Inspecting system...


## You don't appear to be running an Enterprise Linux based system,
please contact NodeSource at https://github.com/nodesource/distributions/issues
if you think this is incorrect or would like your distribution to be considered
for support.


Exited with code exit status 1
CircleCI received exit code 1

Below is the circle ci config yml file that I am using.

version: 2.1
orbs:
  node: circleci/node@4.1.0

jobs:
  build:
    machine:
      enabled: true
    steps:
      - add_ssh_keys:
          fingerptints:
            - "my:ssh:fingerprint:placeholder"
      - checkout
      - run:
          name: Installing nvm and node...
          command: 'sudo curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -'
          # below is not working either
          # command: |
          #   ssh $SSH_USER@SSH_HOST 'sudo curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -'
      - run:
          name: Update npm
          command: |
            ssh $SSH_USER@SSH_HOST 'sudo npm install'

workflows:
  build_and_test:
    jobs:
      - build
  # node-tests:
  #   jobs:
  #     - node/test

I checked the source one Github and it looks like that message happens when the rpm binary is not available

This is due to the fact that the CircleCI convenience images are based on Ubuntu as opposed to Redhat/Centos etc. You’ll want to make use of the deb subdomain instead

sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

Also, I see you are using:

    machine:
      enabled: true

in your config which is using an image which will be deprecated. You’ll want to also take a look at this thread.