ag-grid: Missing src for sourcemap in ag-charts-community package
I’m submitting a … (check one with “x”)
[x] bug report => see 'Providing a Reproducible Scenario'
[] feature request => do not use Github for feature requests, see 'Customers of AG Grid'
[] support request => see 'Requesting Community Support'
Current behavior
When bundling ag-charts-community with react-scripts (create react app), the bundler throws errors when It cant find the src/ folder in node modules
WARNING in ./node_modules/ag-charts-community/dist/esm/es5/util/value.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/brandonryan/Development/hexagon/asd-omni/node_modules/ag-charts-community/src/util/value.ts' file: Error: ENOENT: no such file or directory, open '/Users/brandonryan/Development/hexagon/asd-omni/node_modules/ag-charts-community/src/util/value.ts'
@ ./node_modules/ag-charts-community/dist/esm/es5/chart/groupedCategoryChart.js 59:0-45 98:35-47
@ ./node_modules/ag-charts-community/dist/esm/es5/main.js 10:0-45 10:0-45
@ ./node_modules/@ag-grid-enterprise/charts/dist/esm/es5/main.js 2:0-43 4:8-12
@ ./node_modules/@ag-grid-enterprise/all-modules/dist/esm/es5/main.js 6:0-62 24:0-43 24:0-43 38:119-135
@ ./src/components/DesyncedJobs/DesyncedJobs.jsx 6:0-61 261:17-27
@ ./src/App.jsx 13:0-70 93:39-51
@ ./src/index.js 13:0-32 24:39-42
Expected behavior
There would be no build warnings.
Please tell us about your environment:
Machine: MacOS Monterey IDE: VSCode Package Manager: yarn@1.22.15
- AG Grid version: 27.1.0
-
Browser: N/A
-
Language: typescript
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 26 (10 by maintainers)
I can see why this is still a problem - apologies for the hassle, I’ll get this fixed for our next release
Please upgrade to 28.0.2 and retry - I believe this should be resolved now.
thanks
Hello, any news on this one?
Nevertheless the distributed sourcemaps are not usable by any means, and are strictly a nuisance. Will they be repaired or removed?
I’ve taken a look and you can put this down to crossed wires - I’ve updated AG-6375 to say this:
AG-6759 is the ticket to track for this - it’s been done and will appear in the pipeline shortly.
This problem impacts anyone who uses
source-map-loader
. It is due to generated.js.map
files pointing to files insrc/
that are not distributed with the NPM release. The correct fix is to remove the.js.map
files, or to inline them without references to files outside the/dist
hierarchy.Thanks a lot @seanlandsman May I know when will you have next release so I could check in around the time.
Thanks for reporting this - we apologise for the inconvenience and will be issuing a fix for this in our next release, currently scheduled for 3 weeks time.
I’m getting the same issue with
@ag-grid-community/client-side-row-model
.My bet is there’s something wrong with how esm modules are built?
This is working for @benshope and me now.
package.json:
Warnings: