Custom Library No such file or directory


In the web editor

I've uploaded an external library zip format, everything ok.

I try to "verify" an exemple and "No such file or directory"

same result with RCSwitch...

It looks like it can't find it

need help.


There are quite a few reports of this issue with the Arduino Web Editor. Here are the ones I found after a quick glance:

There is a comment from one of the Arduino developers in the first link:

smellai: Thanks for your report @tko1982, we'll try to find out what is happening

So my guess is that's where we'll get the first news of any results of the investigation. You might want to subscribe to that thread.

Until then, the workaround would be to use the standard Arduino IDE, which you can download here:

Tks Pert,

It seems to work on an old account i used.

But not on the new account i've just created...

It does seem to be a sporadic problem. I tried to reproduce it using the exact library file that caused the issue for someone else but there was no error for me. Unfortunately that might make it harder for the developers to find the problem.

Thank you @fredoc, you provided the right information. It seems it happens to new users only, we'll investigate more

It was an error on our end. It should be solved now. Can you confirm?

I still can’t get it to work. It might be that I have installed the libraries wrong, but I can’t tell. I have tried to reinstall the libraries from the file I used when it worked but it doesn’t seem to work. I have been working on this for three weeks and I am having a hard time remembering what I have done to what account.

I have attached the zip file that holds the libraries I am trying to include. It seems to grab the examples but not the libraries. (74.1 KB)

Please do this:

  • Preferences > Always show output panel (check)
  • Preferences > Console: Show verbose output (check)
  • Hover the mouse over the red bar that shows the error message. Click and drag it up so you can see the black console window.
  • Click the icon in the top right corner of the console that looks like two pieces of paper.
  • Paste the error in a message here USING CODE TAGS (</> button on the toolbar).
./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -logger humantags -fqbn arduino:avr:uno -build-cache /tmp -build-path /tmp/777816859/build -verbose -libraries /tmp/777816859/custom -libraries /tmp/777816859/pinned /tmp/777816859/MotorTest

Using board 'uno' from platform in folder: /home/ubuntu/opt/cores/arduino/avr

Using core 'arduino' from platform in folder: /home/ubuntu/opt/cores/arduino/avr

Detecting libraries used...

/home/ubuntu/opt/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/ubuntu/opt/cores/arduino/avr/cores/arduino -I/home/ubuntu/opt/cores/arduino/avr/variants/standard /tmp/777816859/build/sketch/MotorTest.ino.cpp -o /dev/null

/tmp/777816859/MotorTest/MotorTest.ino:2:21: fatal error: UCMotor.h: No such file or directory

#include <UCMotor.h>


compilation terminated.

exit status 1

@feqlzma and @wsroboticsizzy, the error was caused by the UCMotor library using the incorrect examples folder name “example”. With the regular Arduino IDE this doesn’t cause any real problem, and so you will find many Arduino libraries that don’t follow this part of the Arduino libraries specification. However, this causes the Arduino Web Editor to think the file you provided contains sketches, not a library. So it happily imports the library’s example sketches, while ignoring the library. The solution is to simply rename the example folder to the correct name: examples. I have attached a file with the problem corrected in case you don’t feel like making this change yourself.

So I think the error you encountered has nothing to do with the original bug reported in this thread.

This is likely to be a fairly common problem so perhaps the Arduino developers might look at how the import’s library detection can be improved. In a recent automated scan of 8737 unique (not development forks) Arduino libraries on GitHub, my script detected that 345 had an incorrect examples folder name. (74.6 KB)