Try building your code with the Arduino IDE then to check if it’s a PlatformIO issue. Some people ran into “gotchas” here and this.