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.

You may need an appropriate loader to handle this file type

See original GitHub issue

I’m trying to deploy my app but when I run this command: npm run build I get some error messages.

issue issue_2

Versions: Node: v7.4.0 NPM: 4.0.5 React-Boilerplate: 3.4.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Jarinelcommented, Apr 12, 2017

Looks like it’s a bug in babel-plugin-transform-react-constant-elements. Had the same issue and removing it from env plugins helped me

1reaction
danielrobcommented, Apr 9, 2018

Apologies to comment on a close issue, but for those who end up here from google, my gotcha here was I had added code outside of app directory, not realising that the react-boilperplate package.json configures babel, and configures it only the app directory.

Updating to:

  "babel": {
     "presets": [ ... ]
    "env": {
      "production": {
        "only": [
          "app1",
          "app2",
          "common"
        ],
...

Solved my problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

"You may need an appropriate loader to handle this file type ...
js file is doing is importing react, but it seems like the 'babel-loader' is not working. I am using 'babel-loader' 6.0.0. javascript ·...
Read more >
Fix : You may need an appropriate loader to handle this file type
The “You may need an appropriate loader to handle this file type” error is encountered in the command prompt of Windows or Linux...
Read more >
You may need an appropriate loader to handle this file type ...
I 'm having a problem configuring Webpack for Typescript and React. After running the NPM script: webpack serves ./webpack/webpack.config.ts ...
Read more >
Module parse failed: Unexpected token. You may ... - GitHub
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. #996.
Read more >
You might need an appropriate loader to handle the file type ...
You might need an appropriate loader to handle the file type error. r/react - Hi , I am getting an appropriate loader required...
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