Error after adding cordova.js


I am building a project at
After adding the line <script src="cordova.js"></script>, I get the following error:

TypeError: undefined is not an object (evaluating ‘$containerEl.length’)

How can this error be resolved?

What is your process for debugging your app? Remember that Cordova can only be run in a Cordova-simulated environment, so if you are just opening your app from the local file system without any sort of command-line simulate command, you’ll encounter errors.

I solved the problem in another way, load cordova.js dynamically after Framework7 initialization.