segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Warnings from create-react-app/react-scripts v5 #1454

Closed brandongregoryscott closed 2 years ago

brandongregoryscott commented 2 years ago

There are some warnings being thrown from including sourcemaps without source files after upgrading to create-react-app/react-scripts v5:

WARNING in ./node_modules/ui-box/dist/src/utils/split-props.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/utils/split-props.ts' file: Error: ENOENT: no such file or directory, open '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/utils/split-props.ts'
 @ ./node_modules/ui-box/dist/src/index.js 23:20-50
 @ ./node_modules/evergreen-ui/esm/index.js 3:0-43 3:0-43
 @ ./src/App.js 4:0-36 9:35-39
 @ ./src/index.js 7:0-24 11:33-36

WARNING in ./node_modules/ui-box/dist/src/utils/style-sheet.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/utils/style-sheet.ts' file: Error: ENOENT: no such file or directory, open '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/utils/style-sheet.ts'
 @ ./node_modules/ui-box/dist/src/styles.js 13:38-68
 @ ./node_modules/ui-box/dist/src/index.js 17:28-47
 @ ./node_modules/evergreen-ui/esm/index.js 3:0-43 3:0-43
 @ ./src/App.js 4:0-36 9:35-39
 @ ./src/index.js 7:0-24 11:33-36

WARNING in ./node_modules/ui-box/dist/src/value-to-string.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/value-to-string.ts' file: Error: ENOENT: no such file or directory, open '/Users/brandon.scott/cra-v5-evergreen-warnings/node_modules/ui-box/src/value-to-string.ts'
 @ ./node_modules/ui-box/dist/src/get-css.js 15:42-70
 @ ./node_modules/ui-box/dist/src/enhancers/background.js 15:34-55
 @ ./node_modules/ui-box/dist/src/enhancers/index.js 15:32-55
 @ ./node_modules/ui-box/dist/src/index.js 39:14-42
 @ ./node_modules/evergreen-ui/esm/index.js 3:0-43 3:0-43
 @ ./src/App.js 4:0-36 9:35-39
 @ ./src/index.js 7:0-24 11:33-36

37 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.70.0 compiled with 37 warnings in 15239 ms

Related: https://github.com/facebook/create-react-app/discussions/11767

It sounds like disabling inline sourcemaps is our best bet. We may also need to do the same for ui-box

brandongregoryscott commented 2 years ago

This should be resolved in v6.9.9