So if the problem is Vin pin, can I use external power 5V to LCD and external power USB to NodeMCU?
I don't know what the problem is.
At this point I was merely pointing out that I don't think it is a s/w issue since I have run a NodeMCU with i2c backpack using the same version of IDE s/w and hd44780 library.
The way you have said you have hooked things up is running a single 5v i2c bus.
5v is too high of a voltage for the NodeMCU pins.
Using 5v signals with a 3v processor can cause issues or even damage the 3v processor.
I use voltage converters when using a 3v master and 5v slaves.
There are ways to wire things up without using a voltage converter as Paul suggested you could use 3v clamping diodes instead of the voltage converter shown in the photo.
Alternatively, you could also run the i2c bus with 3v pullups.
Either of these is running the i2c signals at 3v which is out of spec for the PCF8574 at 5v but usually works.
To run 3v pullups you have ensure that no 5v slave has pullups to 5v and add external pullups to 3v.
With the style of backpack you showed in your photo it requires modification to the backpack to remove the pullups.
This is why I choose to use level converters. They are inexpensive, easier to wire up and nothing is run out of spec.
All that said, it appears that the i2c bus appears to be "working" at least to some extent since the PCF8574 is responding at address 0x27.
Usually when that happens there is a soldering issue between the backpack and the LCD.
But we still have not seen your actual board & wiring and soldering to see if there are any issues beyond running the i2c bus at a voltage that is too high for the NodeMCU.
If I had to guess, in addition to the 5v issue, I'd guess that there is soldering issue either on the 16 pin header with the LCD or you were unlucky and got a backpack with a PCF8574 that has soldering issues on it.
With your current setup, you could be sitting on the edge of damaging the NodeMCU. i.e. it might "work" now due to the VCC voltage from using USB voltage and the 4.7k resistors on the backpack but it might tip things over and damage the ESP8266 if you start adding other i2c slaves that also have pullups on them.
IMO, I'd still be concerned about using 5v signals with the 3v NodeMCU even it appears to "work" or so far not caused damage, since the ESP8266 is a 3v part and is not spec'd to be 5v tolerant.
ARG!!!! I just smoked my NodeMCU.
Smoke, literally smoke came out of one of the components and now my office really stinks. It was my fault; some loose wires slipped and shorted together while I was trying to get some exact voltage readings to see how much current you are pulling on the 3v esp8266 pins by using 5v pullups with 4.7k resistors.
A great example of what can happen when messing about with this kind of stuff.