Error compiling for board arduino mega

Hello,

Could anybody guide me to correct this error. I am using dht22 sensor to show data on serial monitor of arduino mega 2560. Moreover, i am new to arduino.

Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]

goroutine 1 [running]:
github.com/arduino/arduino-cli/legacy/builder.ResolveLibrary(0x120c25a0, 0x12362384, 0x5, 0x12362384)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/resolve_library.go:64 +0x14b
github.com/arduino/arduino-cli/legacy/builder.findIncludesUntilDone(0x120c25a0, 0x120e0fc0, 0x88ed00, 0x12184690, 0x12007e40, 0x1237b300, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:358 +0x3b6
github.com/arduino/arduino-cli/legacy/builder.(*ContainerFindIncludes).Run(0xdebc68, 0x120c25a0, 0xdebc68, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:152 +0x3e5
github.com/arduino/arduino-cli/legacy/builder.runCommands(0x120c25a0, 0x12061e1c, 0x20, 0x20, 0x1, 0x1b2ffff, 0x800)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:210 +0xbd
github.com/arduino/arduino-cli/legacy/builder.(*Builder).Run(0x12069f40, 0x120c25a0, 0xdebbb4, 0x12006c98)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:117 +0xb9c
github.com/arduino/arduino-cli/legacy/builder.RunBuilder(...)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:226
main.main()
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-builder/main.go:398 +0x6d2
C:\Program Files (x86)\Arduino\arduino-builder returned 2
Error compiling for board Arduino/Genuino Mega or Mega 2560 Liteblue.

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

Regards.

I believe this is a bug specific to Arduino IDE 1.8.10. Please use Arduino IDE 1.8.9. You can download it here:
https://www.arduino.cc/en/Main/OldSoftwareReleases

The Arduino IDE 1.8.11 release is planned for today, so when that comes out give it a try and see if they have fixed the bug.