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

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

Open
PetterRuud opened this issue Dec 16, 2021 · 6 comments
Open

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

PetterRuud opened this issue Dec 16, 2021 · 6 comments
Labels

Comments

@PetterRuud
Copy link

PetterRuud commented Dec 16, 2021

Describe the bug

Cant parse the source map for toast-ui/editor

Compiled with warnings.

Failed to parse source map from 'node_modules/.pnpm/@[email protected]/node_modules/@toast-ui/editor/dist/purify.js.map' file: Error: ENOENT: no such file or directory, open 'node_modules/.pnpm/@[email protected]/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
  • using PNPM, react-scripts 5.0.0 (webpack 5)
  • There is no purify.js.map in the dist folder

Expected behavior

Compile with no warnings

@PetterRuud PetterRuud added the Bug label Dec 16, 2021
@PetterRuud PetterRuud changed the title Failed to parse source map Failed to parse source map (@toast-ui/editor/dist/purify.js.map) Dec 16, 2021
@dogeow
Copy link

dogeow commented Jan 22, 2022

+1

@myrddral
Copy link

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
Copy link

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
Copy link

msalahz commented Feb 28, 2022

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

@HungCP
Copy link

HungCP commented Mar 10, 2022

It happens when I upgrade webpack from 4 to 5

@siyeons
Copy link

siyeons commented Mar 15, 2022

I think this issue is related to this PR.
This PR applies to [email protected].

While looking for solutions, I found similar issues in other library. (mswjs/msw#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants