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.

webpack.js:

module: {
    loaders: [
        {
            test: /\.jsx?$/,
            exclude: /(node_modules|bower_components)/,
            loader: 'babel'
        }
    ]
}

.babelrc:

{
    "blacklist": [
        "useStrict"
    ],
    "plugins": [
        "transform-es2015-modules-commonjs"
    ],
    "presets": [
        "react",
        "es2015",
        "stage-0",
        "stage-1",
        "stage-2",
        "stage-3"
    ]
}

Command:

 ./node_modules/.bin/webpack --config webpack.js 

Expected result: successful build

Actual result:

Unknown option: .babelrc.blacklist
at Logger.error (node_modules/babel-core/lib/transformation/file/logger.js:43:11)
at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:245:18)
at OptionManager.addConfig (node_modules/babel-core/lib/transformation/file/options/option-manager.js:206:10)
at OptionManager.findConfigs (node_modules/babel-core/lib/transformation/file/options/option-manager.js:347:16)
at OptionManager.init (node_modules/babel-core/lib/transformation/file/options/option-manager.js:392:12)
at File.initOptions (node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at transpile (node_modules/babel-loader/index.js:12:22)
at Object.module.exports (node_modules/babel-loader/index.js:69:12)
@ multi export

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:73 (7 by maintainers)

github_iconTop GitHub Comments

46reactions
sunyang713commented, Nov 8, 2015

Hi, I had a very similar issue where my babel preset options were unknown. I’m pretty new to all this, but npm install babel-preset-es2015 and npm install babel-preset-react solved my problem. I forgot to install the dependencies beforehand, and after installing them things worked out.

8reactions
iscekiccommented, Nov 15, 2015

I solved it.💡

The issue for me was that npm install babel-loader --save-dev was installing an incorrect version of babel-loader (^5.4.0).

I edited my package.json manually, setting the version to ^6.1.0, removed the node_modules directory, and then ran npm install, which fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

openssl keeps giving me "unknown option" errors - Server Fault
it says "unknown option -new" and then lists all of the options, one of which is of course "-new". Google the error message...
Read more >
Error: Unknown option '--output' React & Django
and when I try to run this command: npm run build it shows me an error: [webpack-cli] Error: Unknown option '--output'. How can...
Read more >
Error: Unknown option '-p' · Issue #3 · newrelic/video-videojs-js
Running npm run build throws the following error: [webpack-cli] Error: Unknown option '-p' [webpack-cli] Run 'webpack --help' to see available commands and ...
Read more >
Scaffold error: unknown option -t - monday Apps & Developers
I'm trying to build a test integration but keep getting the same error when running the scaffold command in my commandline: “error: unknown...
Read more >
CTGDKM010E Unknown option operator switch encountered.
CTGDKM010E Unknown option operator switch encountered. Explanation. The tdimiggbl command was invoked with an unknown option.
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