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

Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map #137

Closed
andisaba opened this issue Sep 5, 2022 · 12 comments

Comments

@andisaba
Copy link

andisaba commented Sep 5, 2022

Have used 'React Awesome Reveal' with React 17... no problems... works extremely well!

However, I have installed and tried to implement in current React 18 project and now receiving 100 errors in terminal... basically all reveal error types ...the following is an example:

WARNING in ./node_modules/react-awesome-reveal/dist/module.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/react-awesome-reveal/dist/fadeIn.ts' file: Error: ENOENT: no such file or directory, open '.../node_modules/react-awesome-reveal/dist/fadeIn.ts'

Is 'React Awesome Reveal' not compatible with react 18 yet OR is there some other possible explanation that I am overlooking?

Thanks in advance for your prompt reply!

Andrew

@morellodev
Copy link
Collaborator

React Awesome Reveal is fully compatible with React 18 starting from v4, this is not an issue related to React 18 support.

It seems your setup tries to read the source maps from an invalid path (source maps are shipped with the package), may you give me additional details?

@andisaba
Copy link
Author

andisaba commented Sep 5, 2022

OK ... my only main difference between my last project and this one is Material UI installed.
Dependencies include:

"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"@mui/styled-engine-sc": "^5.8.0",
"react-awesome-reveal": "^4.0.1"

I installed 'react-awesome-reveal' via NPM ...npm install react-awesome-reveal

No errors on install shown!

In my component:

import { Fade } from 'react-awesome-reveal;

Wrapped 2 divs as shown(these are styled divs) :

  <Fade>
    <HeaderTitleText>Hello</HeaderTitleText>
    <HeaderTitleText1>World</HeaderTitleText1>
  </Fade>

The problem seems to be in the import phase... so if I comment out the import there are no errors
Any suggestions?

Edited: Tried deleting and reinstalling 'node_modules' and 'package-lock.json' files WITHOUT success!

@morellodev morellodev added the cannot reproduce The issue is not reproducible label Sep 15, 2022
@animesh28
Copy link

This issue persists on my end too, I've got 100 compile warnings from one import 😢

@OlegGlo
Copy link

OlegGlo commented Sep 18, 2022

Same issue here, but component works as expected.

@fidaay
Copy link

fidaay commented Sep 18, 2022

I got the same issue andisaba presents.

@Soapalin
Copy link

Soapalin commented Sep 26, 2022

same for me and I also use Material UI...

@fidaay
Copy link

fidaay commented Sep 26, 2022

To anyone stopping by, I did this with react-app-rewired to neutralize the warning messages:

module.exports = {
  webpack: function (config, env) {
    return {
      ...config,
      stats: 'none',
      ignoreWarnings: [/Failed to parse source map/],
    };
  },
};

@morellodev
Copy link
Collaborator

So I guess you are using create-react-app, it was not specified when the issue was opened. If I have time I will look into this, but it is not an issue with the lib itself.

@andisaba
Copy link
Author

Yes confirmed ...used create-react-app ...would be great if you could look into this and indicate a fix!

Ignoring warnings as indicated by 'fidaay' isn't addressing the underlying issue

@fidaay
Copy link

fidaay commented Sep 27, 2022

Yes confirmed ...used create-react-app ...would be great if you could look into this and indicate a fix!

Ignoring warnings as indicated by 'fidaay' isn't addressing the underlying issue

I shared what I did, didn't indicate anything. In that way I can develop without seeing 100 warning messages.

@morellodev morellodev removed the cannot reproduce The issue is not reproducible label Oct 10, 2022
@morellodev
Copy link
Collaborator

Fixed in v4.1.0

@andisaba
Copy link
Author

Thanks for the fix... that's fantastic!

I'm keen to give it another go... fingers crossed!

Cheers!

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

No branches or pull requests

6 participants