Well, after some trial and error I ended up with just adding the build_flags option with the path to the MySensors library and now building works fine. Here's my final platform.ini: [env:nodemcu] platform = espressif framework = arduino board = nodemcu build_flags = -I../lib/libraries/MySensors Now to figure out why the auto upload doesn't work. If I upload manually it works fine, but when I add "targets = upload" it keeps trying to connect then times out with an error. No big deal though. I don't mind uploading manually. Thank you for your help.