problem in compiling code

error appeared:
Arduino: 1.8.7 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\SAC\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:30:0,

from C:\Users\SAC\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22,

from C:\Users\SAC\Desktop\IGN2\IGN2.ino:18:

C:\Users\SAC\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6

std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

^

In file included from C:\Users\SAC\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22:0,

from C:\Users\SAC\Desktop\IGN2\IGN2.ino:18:

C:\Users\SAC\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6

std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

^

Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\SAC\Documents\Arduino\libraries\ArduinoJson-6.x
Not used: C:\Users\SAC\Documents\Arduino\libraries\CoogleIOT
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This error means you're using a version of ArduinoJson library that is not compatible with this code. The ArduinoJson library 6.x.x versions have breaking changes that make them not work with code written for the ArduinoJson 5.x.x versions.

The recommended solution is to roll back to the newest 5.x.x release of ArduinoJson:

  • Sketch > Include Library > Manage Libraries...
  • Wait for the download to finish.
  • In the "Filter your search..." box, type "arduinojson".
  • In the search results, click on "ArduinoJson by Benoit Blanchon"
  • From the dropdown version menu, select "5.13.4".
  • Click "Install".
  • Wait for the installation to finish.
  • Click "Close'. The code should now compile.

The alternative solution is to update the code to work with the 6.x.x versions of ArduinoJson. You will find a guide to this here:

Reference: