nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
17.23k stars 1.76k forks source link

Failed to parse source map (@toast-ui/editor/dist/purify.js.map) #2137

Open PetterRuud opened 2 years ago

PetterRuud commented 2 years ago

Describe the bug

Cant parse the source map for toast-ui/editor

Compiled with warnings.

Failed to parse source map from 'node_modules/.pnpm/@toast-ui+editor@3.1.1/node_modules/@toast-ui/editor/dist/purify.js.map' file: Error: ENOENT: no such file or directory, open 'node_modules/.pnpm/@toast-ui+editor@3.1.1/node_modules/@toast-ui/editor/dist/purify.js.map'

To Reproduce

Steps to reproduce the behavior:

  1. Add "@toast-ui/editor": "^3.1.1", "@toast-ui/react-editor": "^3.1.1",
  2. start devserver

Expected behavior

Compile with no warnings

dogeow commented 2 years ago

+1

myrddral commented 2 years ago

Same here with toastUI editor react wrapper 3.1.2.

config: npm: 8.3.0 node: 14.18.3 react: 17.0.2 react-scripts: 5.0

finleysg commented 2 years ago

Looks to be a problem in combination with react-scripts v5 (at least for me). No issues with react-scripts v4.0.3.

There are two critical vulnerabilities fixed in react-scripts v5, so we wouldn't want to stay on v4 for too long.

msalahz commented 2 years ago

I'm having the same issue, Any updates about this?

HungCP commented 2 years ago

It happens when I upgrade webpack from 4 to 5

siyeons commented 2 years ago

I think this issue is related to this PR. This PR applies to react-scripts@5.0.0.

While looking for solutions, I found similar issues in other library. (https://github.com/mswjs/msw/issues/1030)

The above issues include the following solutions. just add the GENERATE_SOURCEMAP=false before the start script.

"scripts": {
    "start": "GENERATE_SOURCEMAP=false react-scripts start",
   ...
  },

or

In my case:

...
 "start": "GENERATE_SOURCEMAP=false craco start"
...

I think this is a very ad hoc solution... but it works..

Hopefully the missing or incorrect source map will be fixed.