Hello to all of you! This is my first entry to the forum, and I hope somone can help me. I have got the great new Build Web Servers and trying som of the projects. I’m not familiar with the PlatformIO, but I’m trying to learn!
I have copied all files from build-web-servers-ebook-main.zip to the Documents\PlatformIO\Projects into a folder called “build-web-servers-ebook-main”
Then I start PlatformIO and and select PIO Home and use the option “Open Project” and in the window appearing, I navigate (via Project) to find a project to open. I open the folder “2_2_Multiple_Outputs_Toggle_Switch” and click the option “2_2_Multiple_Outputs_Toggle_Switch” next to “Cancel”.
So far, everything is ok, and also compiling the source code is ok. The problem occurs when I try to “Build Filesystem Image”, I get the following error:
“Building in release mode
Building SPIFFS image from ‘data’ directory to .pio\build\esp32doit-devkit-v1\spiffs.bin
error: can’t read source directory
*** [.pio\build\esp32doit-devkit-v1\spiffs.bin] Error 1″
The folder “data” is ok and the favicon, html-, css- and js-files are all inside the data folder.
Any of you have suggestions to solve the problem, what am I doing wrong?
Hope to hear from you soon!
Just to inform you all that the problem I described 20 minutes ago is just solved!
When I removed other projects from the workspace in PlatformIO, the function “Build Filesystem Image” worked without any problems. I don’t know the reason why, but I think the data-folder was mixed up with another project not having the data-folder. Never mind, now it workes and I’m happy!
I’ll close this issue.
If you need further help, you just need to open a new question in our forum.
The reason for the problem is that your project is not the default project. Look at the blue line at the bottom left part of your screen where VSCode (PlatformIO) will list what project it thinks it is working with. It was probably not the project you thought. Deleting the wrong project forces VSCode to use the right one, since that is the only one left. Note that you can happily download the right code to the ESP32 with the wrong project. It is all somewhat confusing.