Keep getting "Error: Realms opened in Additive-only schema mode do not use a migration function"

Hi,

I am trying to use Realm as part of an electron app where I open realm with Sync option enabled.
However, when I added “migration” option, I am getting

Error: Realms opened in Additive-only schema mode do not use a migration function
at openPromises.push.Promise (/Users/tareqa/Documents/Work/buying-app-desktop/node_modules/realm/lib/extensions.js:197:50)
at new Promise ()
at Function.open (/Users/tareqa/Documents/Work/buying-app-desktop/node_modules/realm/lib/extensions.js:196:31)

My code:

const user = await Realm.Sync.User
      .login(
        'https://my-cloud-realmdb-url/',
        Realm.Sync.Credentials.jwt(token),
      );

const config = user.createConfiguration({
      sync: {
        url,
        error: (sender, err) => {
          logError(err);
        },
      },
      schema,
      schemaVersion,
      migration: () => {
        logError('migration .... =>>>> ');
      },
    });

const realm = await Realm.open(config);