quant
quant

Reputation: 23122

AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community)

I'm getting this warning message in my console:

AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.

This warning is the same as was encountered by this user: Warning in ag-Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community)

However, in that case they were installing packages/modules in the same package.json file. My package.json installs ag-grid like this:

"ag-grid-community": "31.3.2",
"ag-grid-enterprise": "31.3.2",
"ag-grid-vue3": "31.3.2",

The imports themselves don't seem to use modules either:

quant@localhost: ~/repo/web_ui $ rg "import.*ag-grid"
src/App.vue
14:import { ModuleRegistry } from "ag-grid-community";

src/components/StoredProcExec.vue
34:import { AgGridVue } from "ag-grid-vue3";

src/components/ServerSideView.vue
37:import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid
38:import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid
40:import { AgGridVue } from "ag-grid-vue3";

src/components/StoredProcView.vue
101:import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid
102:import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid
106:import { AgGridVue } from "ag-grid-vue3";

src/pages/other/WhoAmI.vue
17:import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid
18:import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid
19:import { AgGridVue } from "ag-grid-vue3";

Is this an ag-grid bug?

Upvotes: 1

Views: 168

Answers (1)

Lucas Marra
Lucas Marra

Reputation: 337

You are seeing this message because you are using the ModuleRegistry which is part of the @ag-grid-community/core Modules.
You can see it on this page of the documentation (use the browser search to find it easier).
I also had this “problem”, I solved it by just removing this code snippet, in the Packages part, there's no need for that.

Upvotes: 3

Related Questions