Software serial works on Uno, but not Nano

Have tried several different ways to make the Nano work with the same sketch as the Uno...I think I have it narrowed down to software serial. When I try to use Software serial, the program errors our during upload, as if it cannot tx and/or rx on the hardware serial port...I have read many examples and tried many things, just cannot get Nano to upload the sketch with a call to Software serial.

Also I modified the Nextion.h as described on many Nextion sites

The sketch below works as expected on an Uno, but will not upload on the Nano

#include "Nextion.h"
SoftwareSerial HMISerial(10, 11); //yellow (RX on Nextion) is 11

NexText t0 = NexText(0, 2, "t0");
NexSlider h0 = NexSlider(0, 1, "h0");
NexGauge z0  = NexGauge(0, 3, "z0");
NexDSButton bt0 = NexDSButton(0, 5, "bt0");


NexTouch *nex_listen_list[] = {&h0, &bt0, NULL};

void bt0PopCallback(void *ptr)
{
  uint32_t dual_state;
  NexDSButton *btn = (NexDSButton *)ptr;
  dbSerialPrintln("b0PopCallback");
  dbSerialPrint("ptr=");
  dbSerialPrintln((uint32_t)ptr);
  bt0.getValue(&dual_state);
  
  if (dual_state)               
  {
    digitalWrite(13, HIGH);           // if my dual state buton is pressed
  }
  else
  {
    digitalWrite(13, LOW);            // if not
  }

}
void h0PopCallback(void *ptr)
{
  int numberx = 0;
  int gosterge = 0;
  uint32_t number = 0;
  char temp[10] = {0};
  dbSerialPrintln("h0PopCallback");
  h0.getValue(&number);
  utoa(number, temp, 10);
  t0.setText(temp);
  numberx = number;
  gosterge = map(numberx, 0, 100, 0, 180);
  z0.setValue(gosterge);
}

void setup(void)
{
  pinMode(13, OUTPUT);
  nexInit();
  h0.attachPop(h0PopCallback);
  bt0.attachPop(bt0PopCallback, &bt0);
  dbSerialPrintln("setup done");
}

void loop(void)
{
  nexLoop(nex_listen_list);
}

Thanks

the program errors our during upload

It would be useful to see the error message. The whole error message copied from the console and pasted into a post.

As the Uno and the nano have the same processor the problem is not with the code.
If it is a cheap clone nano then they often have different USB to serial chips to a real nano.

If this is the case you will need a serial driver that copes with the different chip in your computer.

Thanks all, for some reason it is working now?!? All I did was change the IDE to show verbose output while compiling and it works! Not sure of the answer but all is good now...maybe the Hawthorne effect!

But I will keep in mind about the non genuine Arduino boards...

Thanks
Leslie