'Row Model "Server Side" not found. Please ensure the ag-Grid Enterprise Module @ag-grid-enterprise/server-side-row-model is registered.';

I'm recently getting this error unable to load all the ag-grid tables. I googled it and added like this import { LicenseManager } from "@ag-grid-enterprise/core"; import { ModuleRegistry, AllModules } from "@ag-grid-enterprise/all-modules"; import { ServerSideRowModelModule } from "@ag-grid-enterprise/server-side-row-model";

ModuleRegistry.registerModules([AllModules, ServerSideRowModelModule]);strong text



Solution 1:[1]

Depending on whether your project is using AG Grid packages or modules there are different fixes required to use the Server Side Row Model.

To check if you are using packages or modules see which you have in your package.json file.

Modules Packages
@ag-grid-community/xxxxx ag-grid-community
@ag-grid-enterprise/xxxxx ag-grid-enterprise

Packages Fix

Make sure you have both community and enterprise packages installed.

"ag-grid-community": "^27.2.0",
"ag-grid-enterprise": "^27.2.0",

Then make sure you have imported the enterprise features with this import.

import 'ag-grid-enterprise';

That should be all you need to do to enable all the enterprise features including the Server Side Row Model.

Modules

Make sure you have installed the Server Side Row model module.

"@ag-grid-enterprise/server-side-row-model": "^27.2.0",

Then make sure you have registered the module along with any other modules that you are using.

import { ModuleRegistry } from '@ag-grid-community/core';
import { ServerSideRowModelModule } from "@ag-grid-enterprise/server-side-row-model";

ModuleRegistry.registerModules([
    ServerSideRowModelModule,
]);

That should be all you need to do to enable all the enterprise features including the Server Side Row Model.

I have written about this more in this blog post.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Stephen Cooper