[React] App crashes with message: You may need an appropriate loader to handle this file type.
See original GitHub issueWhen 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:
- Created 5 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
The same problem… I’m only using
aws-amplify-react
forConnect
is there a way to import it separately?