niuware / mui-rte

Material-UI Rich Text Editor and Viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to parse source map

edg-l opened this issue · comments

commented

Checklist

Description

When building these warnings popout "Failed to parse source map"

Failed to parse source map from '/redacted/node_modules/mui-rte/src/MUIRichTextEditor.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/MUIRichTextEditor.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/Autocomplete.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/Autocomplete.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/Blockquote.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/Blockquote.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/CodeBlock.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/CodeBlock.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/Link.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/Link.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/Media.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/Media.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/Toolbar.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/Toolbar.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/ToolbarButton.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/ToolbarButton.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/components/UrlPopover.tsx' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/components/UrlPopover.tsx'

Failed to parse source map from '/redacted/node_modules/mui-rte/src/utils.ts' file: Error: ENOENT: no such file or directory, open '/redacted/node_modules/mui-rte/src/utils.ts'

I am having the same issue

This bug seems to be happening when react-scripts version used is 5.0.0. You can disable the source map by adding the proper variable in your .env. Check the example here https://stackoverflow.com/questions/51984146/how-to-disable-source-maps-for-react-js-application. I'm going to make a pull request for this repo, to configure the source map properly for future react-scripts versions.

Having the same issue and actively using maps, so disabling it is not an option.
Maybe maps could be disabled in mui-rte? They don't work anyways.

Not sure if this is related to react-scripts, for the actual files in dist folder referring to non-existing ../src path.

Same issue; however there's a pending pull request and tasks are done ? How to make it approve ?

This is still going on.
I think the simple solution is to remove source maps in the deployment package. this way there will not be a reference to non-existent source files.
This is the standard in production packages isn't it? @niuware any chance one of the maintainers can address this issue? it seems simple to solve and as a user of the repo i find it intrusive to my workflow (makes it harder to see if my build has errors in dev mode since there are always errors..)