cypress-social-logins
cypress-social-logins copied to clipboard
Can't solve "Mismatched anonymous define() module" error
As per RequireJS docs, I am loading the script on the login page with this:
<script data-main="res/login" src="res/require.js"></script>
At the top of the login.js script I have:
define(function (require) {
const {GoogleSocialLogin} = require('cypress-social-logins').plugins;
});
But I'm getting a "Mismatched anonymous define() module" error. I've read through the RequireJS documentation, but don't understand how to deal with this.
After that error, I'm getting these errors: "Uncaught ReferenceError: module is not defined" and "Uncaught Error: Module name "cypress-social-logins" has not been loaded yet". I have a feeling solving the first error will take care of these others, but I'm not sure.
Also, I've created the "cypress.json" file, as examples show, but I'm not sure where to put it, or how it gets called.
Any help would be much appreciated!