Okay, there are 2 problems with doing this on a Node MCU.
First, while the ESP8266 should be able to measure voltage on the VDD pin of the chip, it is limited to 1.8 to 3.6 V, and if you are using that method, you are measuring the voltage
after is has gone through the voltage regulator, not from Vin pin.
Second, on the ADC (A0) pin the schematic shows a resister voltage divider which brings the voltage down to (V * 0.3125) and as the ESP8266 ADC pin can only handle up to 1 V, the max input for the A0 pin is 3.3V. So putting a Lipo on that pin (could be 4.2v or more) is not going to work well, I have accidentally (reversed resister divider) exceeded the 1 V limit and the graph looked like an earthquake graph. Up and down, min to max until I disconnected it.
Someone with a better understanding of electronics can look at the schematic and let you know if you can use another resister divider before the A0, but I think that is iffy. Might be possible though. I try to shoot for 10 V = 1 V to make it easier to calculate.
You could try it in the external board, or try something like the adafruit ina219 breakout board which is i2c and measures current and voltage.
I like the Node MCU as a first introduction to the ESP8266, or even for use with a wall wart, but not so much for batteries. I don't think the voltage regulator is efficient enough and if i read the datasheet correctly it wants 4.75 to 10 V. I had a lot of problems using one on a 3.7 V Lipo. So I use them with a wall wart . For testing on batteries I am using the Olimex Wifi-Mod-esp8266 boards, they are between the ESP12 and Node MCU. No buttons, voltage regulator or USB port, runs out of the box (all pullups / downs hard wired) just jump GPIO 0 to ground to program. They have a light that stays on even in deep sleep, but nothing is perfect. I use a firmware which allows you to browse from the web interface to upgrade, so I only have to connect it to the USB adapter once, and it can stay where ever it is after that. Really easy... (ESPEasy)