Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: CRA React Scripts v5.0.0 gives source map warnings on the console #1306

Closed
2 tasks done
inanmadak opened this issue Feb 9, 2022 · 2 comments
Closed
2 tasks done
Labels
type: bug 🐛 Something isn't working

Comments

@inanmadak
Copy link

Package

carbon-components, carbon-components-react, @carbon/grid, @carbon/layout

Browser

No response

Package version

v7.52.0

React version

v17.0.2

Description

I upgraded our current project to React Scripts v5.0.0. However, when I run yarn start, even though the app compiles, the console prints a lot of no such a file or directory warnings regarding source map files. (Similar to below)

I found some discussion regarding similar issues on CRA React Scripts v5. linked here:
facebook/create-react-app#11767

and a PR on CRA: facebook/create-react-app#11752

Please review if you need to do something on these carbon libraries to resolve these issues. If not, this can be ignored.

WARNING in ./node_modules/@carbon/charts/tools.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/[redacted]/node_modules/@carbon/src/tools.js.map' file: Error: ENOENT: no such file or directory, open '/Users/[redacted]/node_modules/@carbon/src/tools.js.map'
 @ ./node_modules/@carbon/charts/configuration.js 9:0-32 195:16-27 213:19-30 218:13-24 226:21-32 231:22-33 236:22-33 237:8-19 245:19-30 250:19-30 268:16-27 280:16-27 281:13-24 294:18-29 319:18-29 351:21-32 355:13-24 363:21-32 364:11-22 381:15-26 396:17-28 428:17-28 447:17-28 462:29-40 471:17-28 492:17-28 499:16-27 508:19-30 509:8-19 517:22-33 518:8-19 522:20-31 524:10-21 532:19-30
 @ ./node_modules/@carbon/charts/index.js 3:0-50 5:0-38
 @ ./node_modules/@carbon/charts-react/area-chart.js 39:15-40
 @ ./node_modules/@carbon/charts-react/index.js 14:35-58
 @ ./src/containers/Dashboard/Summary/index.js 7:0-62 261:57-67 268:40-50
 @ ./src/containers/Dashboard/index.js 12:0-32 119:40-47
 @ ./src/routes/routes.js 12:37-71
 @ ./src/App.js 10:0-37 39:24-34
 @ ./src/index.js 12:0-24 33:8-11

WARNING in ./node_modules/@carbon/utils-position/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/[redacted]/node_modules/@carbon/src/index.js.map' file: Error: ENOENT: no such file or directory, open '/Users/[redacted]/node_modules/@carbon/src/index.js.map'

CodeSandbox example

Steps to reproduce

Upgrade to react-scripts 5.0.0
run yarn && yarn install

Code of Conduct

@joshblack joshblack transferred this issue from carbon-design-system/carbon Feb 9, 2022
@theiliad
Copy link
Member

theiliad commented Mar 2, 2022

there are similar reports here

facebook/create-react-app#11767

@theiliad theiliad added type: bug 🐛 Something isn't working and removed type: bug 🐛 2 labels Jul 14, 2023
@theiliad
Copy link
Member

Seems like there are some solutions offered here facebook/create-react-app#11767

@inanmadak pls let us know if any of these worked out for you. I'm going to close the issue here since it seems like it's not really related to the carbon-charts library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants