question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React] App crashes with message: You may need an appropriate loader to handle this file type.

See original GitHub issue

When wrapping app withAuthenticator() or <Authenticator> the app immediately crashes with this error:

Uncaught Error: Module parse failed: Unexpected token (13:0)
You may need an appropriate loader to handle this file type.
|  * and limitations under the License.
|  */
> :root {
| 
|   /* Colors */
    at eval (style.css:1)
    at Object../node_modules/@aws-amplify/ui/dist/style.css (main.a9a9c0.js:1094)
    at __webpack_require__ (main.a9a9c0.js:64)
    at eval (Amplify-UI-Components-React.js?bf02:13)
    at Object../node_modules/aws-amplify-react/dist/Amplify-UI/Amplify-UI-Components-React.js (main.a9a9c0.js:1628)
    at __webpack_require__ (main.a9a9c0.js:64)
    at eval (Greetings.js?5805:37)
    at Object../node_modules/aws-amplify-react/dist/Auth/Greetings.js (main.a9a9c0.js:1808)
    at __webpack_require__ (main.a9a9c0.js:64)
    at eval (Authenticator.js?5c97:29)

Some packages I’m using:

"aws-amplify": "^1.1.17"
"aws-amplify-react": "^2.3.0"
"react": "^16.6.3"
"webpack": "^4.27.1"

Is it because I’m not using css loader?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
ThrowsExceptioncommented, Jan 27, 2019

Any plans to fix this? Im using next.js for my app and this https://github.com/aws-amplify/amplify-js/blob/master/packages/aws-amplify-react/src/Amplify-UI/Amplify-UI-Components-React.jsx#L5 is causing me to get that error. Would be nice to override to exclude the styles or have them be build as part of the distribution so I didn’t have to custom configure webpack for it.

2reactions
mkrncommented, Jul 17, 2019

The same problem… I’m only using aws-amplify-react for Connect is there a way to import it separately?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactJS error You may need an appropriate loader to handle ...
The problem: You may need an appropriate loader to handle this file type. webpackHotDevClient.js:233 Error in ./components/About.js Module ...
Read more >
"You may need an appropriate loader to handle this file type ...
Coding example for the question Webpack error: "You may need an appropriate loader to handle this file type"-Reactjs.
Read more >
How to fix the error You may need an appropriate loader to ...
How to fix the error “ You may need an appropriate loader to handle this file type, currently no loaders are configured to...
Read more >
Set up your React environment with npm, babel and webpack
src/index.js 6:8 Module parse failed: Unexpected token (6:8) You may need an appropriate loader to handle this file type, currently no ...
Read more >
Error Boundaries - React
These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found