Need help with rpolitex/ArduinoNvs. I can't help it find esp_partition.h

I’m working on ESP32 code using PlatformIO plugin with Visual Studio Code. I need to write int and String to flash. It seems the most popular library is rpolitex/ArduinoNvs. I also tried TridentTD_ESP32NVS. I run into the same issue with both: they can’t find esp_partition.h or esp_spi_flash.h. I’ve spent most of the day chasing dependencies, but I can’t figure it out. I’m guessing I need to add more dependencies to platformio.ini, but I can’t figure out which ones. I would be really grateful for any pointers.

platformio.ini

platform = espressif8266
board = nodemcuv2
framework = arduino
upload_protocol = esptool
lib_deps =
    https://github.com/esp8266/Arduino.git
    ESP8266WiFi @ ^1.0
    olkal/HX711_ADC@^1.2.6
    rpolitex/ArduinoNvs @ ^2.5
    spi_flash
    
lib_extra_dirs = 
    /home/nnn/platformiocode/AJ-PIO/

You say you’re working on an ESP32 yet the platformio.ini uses all ESP8266 devices?

Never add the Arduino core as a library dependency in lib_deps, this leads to extreme weirdness. Arduino-ESP8266 in the correct version is already included when you write framework = arduino.

I would disagree on that one, the Arduino-ESP8266 core has EEPROM emulation by using a page in flash. Look at the examples in Arduino/libraries/EEPROM at master · esp8266/Arduino · GitHub. This is the most painless way to do it.