Comments (6)
Hi @mbzzt,
Thanks for getting in touch.
Please use the following:
npm install react-app-rewired --save-dev Create a file in the root of your project called config-overrides.js with the following contents: module.exports = function override(config, env) { config.resolve.alias["react-dom/server"] = "react-dom/server.js"; return config; } replace the following scripts in your package.json: "react-scripts start" -> "react-scripts start" "react-scripts build" -> "react-scripts build"
Kind regards, Zoheil
Hi @AG-Zoheil,
I didn't understand what we are supposed to replace in our package.json scripts section. I am encountering the same problem on 31.1.1, and 31.2. I have installed the react-app-rewired package, and have included the config override file.
Thanks.
EDIT: I realized they meant to write:
"react-scripts start" -> "react-app-rewired start"
"react-scripts build" -> "react-app-rewired build"
And since then my project has been finally able to build!
from ag-grid.
Hi @mbzzt,
Thanks for getting in touch.
Please use the following:
npm install react-app-rewired --save-dev
Create a file in the root of your project called config-overrides.js with the following contents:
module.exports = function override(config, env) {
config.resolve.alias["react-dom/server"] = "react-dom/server.js";
return config;
}
replace the following scripts in your package.json:
"react-scripts start" -> "react-scripts start"
"react-scripts build" -> "react-scripts build"
Kind regards,
Zoheil
from ag-grid.
This is only an issue for React 17 users that use CRA - non-CRA users or React 18+ users are unaffected.
This is an issue with how CRA consumes ESM modules.
This is a breaking change and should be documented as you say - this was an oversight on my part and documentation will be added shortly to highlight this change (and well as adding this to the changelog).
from ag-grid.
Thank you for your reply.
So this is the only way to use ag-grid along with Create React App going forward?
What was the change in 31.2.0 that caused this?
I could not find any mention of this in the change log nor in documentation. Can you please point me to any official documentation stating that overriding CRA config is the way to go for using ag-grid in a CRA-based application?
IMO, it's really hard to justify such config override just for upgrading ag-grid. And if there's really no other choice, please consider documenting this constraint, so everyone is aware about it.
Thanks.
from ag-grid.
Got it. Thank you for your reply.
from ag-grid.
Hi @mbzzt,
Thanks for getting in touch.
Please use the following:
npm install react-app-rewired --save-dev Create a file in the root of your project called config-overrides.js with the following contents: module.exports = function override(config, env) { config.resolve.alias["react-dom/server"] = "react-dom/server.js"; return config; } replace the following scripts in your package.json: "react-scripts start" -> "react-scripts start" "react-scripts build" -> "react-scripts build"
Kind regards, Zoheil
I tried this. Didn't work.
The following are my dependencies:
"@ag-grid-community/client-side-row-model": "^31.2.1",
"@ag-grid-community/core": "^31.2.1",
"@ag-grid-community/react": "^31.2.1",
"@ag-grid-community/styles": "^31.2.1",
from ag-grid.
Related Issues (20)
- Columns of type 'numericColumn' not aligning text values to right
- Column hover highlighting gets "stuck" on column when `columnHoverHighlight` is set to `false`
- Tooltips occasionally get stuck open forever HOT 3
- Unable to pass data manually to createRangeChart in Integrated Charts HOT 4
- React19beta and 'ResizeObserver': parameter 1 is not of type 'Element'
- Chart Image Export page from doc is not working HOT 1
- EXCEL export can export WYSIWYG
- Error at Legend Key Misalignment with CalloutLabel in AG Grid Integrated Pie Chart HOT 4
- Icons not loading HOT 3
- After i add tooltipField ,hover ,then tooltip show ,table content disappear, HOT 1
- Data validation value getter
- Cell editing HOT 1
- Ag-grid filters unlimited options - Need Help HOT 1
- Text colour artifacting when Grid is used within flex/grids HOT 1
- excel export check style name is valid HOT 1
- AG Grid: Expand row to top HOT 1
- Cell editing HOT 1
- Reopen issue 7854 HOT 3
- Ag-Charts in Vue 3: Broken and Lacking Support HOT 5
- Stumped - Cannot Access API Methods in React Using gridRef HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ag-grid.