This a common problem. There are many ways you can fix this. First of all I will explain the problem. This may happen if you use webpack to bundle all the libraries into one file and using react-router to load pages or using any other technique.
You can append that external library as shown below