Are you trying to run the code in Expo Go? This will not work. You will need to "eject" your code into a bare react native flow. To do this, follow the steps to create a development build on Expo. If you had done this already, you will need to rebuild your code after you install the maplibre library.