Error Firebase

Hi

I am trying to get data from my nodemcu board to firebase.
After trying for two days and many errors i can't find the solution for this one.

This is the error i get:

Arduino: 1.8.5 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

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

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

                 from B:\Arduino\Firebase_wifi_dht\Firebase_wifi_dht.ino:1:

C:\Users\r0675130\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:21: error: 'StaticJsonDocument' was not declared in this scope

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

                     ^

In file included from C:\Users\r0675130\Documents\Arduino\libraries\ArduinoJson-5.13.1\src/ArduinoJson.hpp:9:0,

                 from C:\Users\r0675130\Documents\Arduino\libraries\ArduinoJson-5.13.1\src/ArduinoJson.h:9,

                 from C:\Users\r0675130\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:26,

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

                 from B:\Arduino\Firebase_wifi_dht\Firebase_wifi_dht.ino:1:

C:\Users\r0675130\Documents\Arduino\libraries\ArduinoJson-5.13.1\src/ArduinoJson/JsonObject.hpp:22:77: error: template argument 1 is invalid

   (sizeof(JsonObject) + (NUMBER_OF_ELEMENTS) * sizeof(JsonObject::node_type))

                                                                             ^

C:\Users\r0675130\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:28:34: note: in expansion of macro 'JSON_OBJECT_SIZE'

 #define FIREBASE_JSONBUFFER_SIZE JSON_OBJECT_SIZE(32)

                                  ^

C:\Users\r0675130\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:40: note: in expansion of macro 'FIREBASE_JSONBUFFER_SIZE'

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

                                        ^

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

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

                 from B:\Arduino\Firebase_wifi_dht\Firebase_wifi_dht.ino:1:

C:\Users\r0675130\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:64: error: expected unqualified-id before '>' token

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

                                                                ^

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

You have some code you didn't share, using a library you didn't post a link to, that generates some errors.

When my crystal ball gets back from the cleaners, I'll do a little gazing, to try to find you an answer.

The cause of the error is that you're using an outdated version of the ArduinoJSON library. The firebase-arduino library requires ArduinoJson 6.x.x, but you're using ArduinoJson 5.13.1.

Do this:

  • Delete C:\Users\r0675130\Documents\Arduino\libraries\ArduinoJson-5.13.1. Please be very careful when deleting things from your computer. When in doubt, back up!
  • (In the Arduino IDE) Sketch > Include Library > Manage Libraries
  • Wait for the download to finish.
  • In the "Filter your search..." box, type "arduinojson".
  • Press "Enter".
  • Click on "ArduinJson by Benoit Blanchon".
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".