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 parse failed' error while lazy loading after react-scripts 3.0.0 update #6971

Closed
can-acar opened this issue May 2, 2019 · 6 comments

Comments

@can-acar
Copy link

can-acar commented May 2, 2019

I am lazy loading components in my React app, and it was working all fine. However, after the react-scripts 3.0.0 update, I keep getting the 'Module Parse failed: Unexpected token' error as follows:

./src/routes/App.js 22:9
Module parse failed: Unexpected token (22:9)
You may need an appropriate loader to handle this file type.
| import { Loader } from '../components/Preloaders/Loader';
| var ClippedDrawer = lazy(function () {
>   return import('../components/Drawer');
| });
| var Settings = lazy(function () {

npm version latest

@petetnt
Copy link
Contributor

petetnt commented May 2, 2019

Hi @51tharea,

could you provide a reproducable repo or sample at https://codesandbox.io/ for further debugging? Thanks!

@bugzpodder
Copy link

similar to #6673?

@petetnt
Copy link
Contributor

petetnt commented May 2, 2019

Yep, looks related

@kuzman
Copy link

kuzman commented May 9, 2019

I have commented on the issue #6673 (comment)
we are facing the same issue

@stale
Copy link

stale bot commented Jun 8, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jun 8, 2019
@stale
Copy link

stale bot commented Jun 13, 2019

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Jun 13, 2019
@lock lock bot locked and limited conversation to collaborators Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants