UKHeliBob:
Have you actually got CapacitiveSensor.h on your PC and if so, where ?
What is your Sketchbook location set to ?
Bad example darn: Thought it was included with the default installation... considering it was part of the Examples.
If I start with a blank Sketch and simply add: "#include <interrupt.h>" I get the error. Long story is that a sketch I've been working on for over a year has been compiling successfully that uses ""#include <interrupt.h>" for Board: esp32 Devkit. It suddenly stopped working and gave the 'no file...' error. Couldn't figure it out so started with a clean slate, to no avail.
Sketch Location is: "D:\Steve\Documents\Arduino" (Windows default location of User files)
it appears this needs to be "#include <**avr/**interrupt.h>" in order to work. Don't know why now it's needed, when I didn't have it that way for years working with this sketch.