"Failed to parse source map" errors with datetime picker and CRA5

Hello,

When using the Atlaskit DateTimePicker components in my Create React App 5.0.0 app, I get warnings about missing sourcemaps in @atlaskit/analytics-next-stable-react-context:

Failed to parse source map from '/repos/projectname/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts' file: Error: ENOENT: no such file or directory, open '/repos/projectname/node_modules/@atlaskit/analytics-next-stable-react-context/src/context.ts'

Failed to parse source map from '/repos/projectname/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts' file: Error: ENOENT: no such file or directory, open '/repos/projectname/node_modules/@atlaskit/analytics-next-stable-react-context/src/index.ts'

They’re an annoyance, but short of ejecting or using something like CRACO I can’t see a way to get rid of them. Is there any chance this’ll get fixed up soon?

Thank you!

Did you ever get an answer for this? Running into the same issue.

I did not. I found a way to suppress the warnings using GitHub - jhnns/rewire: Easy monkey-patching for node.js unit tests, but it feels a bit hacky.

I’ve run into other limitations with this datetime picker (e.g. no obvious way for the user to skip to another year), so I’m now looking for an alternative.

I forgot to say, in the short term I’ve disabled sourcemap generation. I’ve updated my package.json as follows:

"start": "GENERATE_SOURCEMAP=false yarn react-scripts start",

Funnily enough, the CRA documentation suggests it’s ignored in development. It’s really not ideal, but it works :man_shrugging:

1 Like