Error Uploading SPIFFS image

I am having some trouble using PlatformIO to upload files to SPIFFS.

I’m using a WeMos D1 Lite V3 as a web server serving static HTML files, but am unable to upload the built SPIFFS image to the board. I have placed my files inside the data folder (which lives on the same directory level as the src folder) and have tried to run pio run --target uploadfs with the following log output:

PLATFORM: Espressif 8266 > WeMos D1 mini Lite
SYSTEM: ESP8266 80MHz 80KB RAM (1MB Flash)
Library Dependency Finder ->
Collected 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP Async WebServer> 1.1.1
| |-- <ESPAsyncTCP> 1.1.3
| | |-- <ESP8266WiFi> 1.0
| |-- <ESP8266WiFi> 1.0
| |-- <Hash> 1.0
|-- <ESPAsyncTCP> 1.1.3
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS>
| |-- <ESP8266WiFi> 1.0
Building SPIFFS image from 'data' directory to .pioenvs\d1_mini_lite\spiffs.bin
Looking for upload port...
Auto-detected: COM3
Uploading .pioenvs\d1_mini_lite\spiffs.bin
error: Failed to open COM3
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [uploadfs] Error 2

I am able to upload built .cpp files and run code on the WeMos successfully, but for some reason, file uploads fail. Any help would be greatly appreciated!

Try to change USB port/cable.