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

webpack command fails with below error. #87

Open
AjayU opened this issue Nov 18, 2016 · 2 comments
Open

webpack command fails with below error. #87

AjayU opened this issue Nov 18, 2016 · 2 comments

Comments

@AjayU
Copy link

AjayU commented Nov 18, 2016

Steps performed.

  1. Downloaded the ZIP from git and unzipped it.
  2. npm install
  3. webpack

Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.13.3
Time: 703ms
+ 1 hidden modules

ERROR in ./modules/main.js
Module build failed: ReferenceError: [BABEL] D:\temporary\Working\webpack-howto-master\example\modules\main.js: Unknown option: direct.presets
at Logger.error (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\file\logger.js:58:11)
at OptionManager.mergeOptions (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\file\options\option-manager.js:126:29)
at OptionManager.init (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\file\options\option-manager.js:216:10)
at File.initOptions (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\file\index.js:147:75)
at new File (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\file\index.js:137:22)
at Pipeline.transform (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-core\lib\transformation\pipeline.js:164:16)
at transpile (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-loader\index.js:12:22)
at Object.module.exports (D:\temporary\Working\webpack-howto-master\example\node_modules\babel-loader\index.js:71:12)

@techaware
Copy link

+1

@kimobrian
Copy link

kimobrian commented Apr 3, 2017

@AjayU @techaware The issue here is due to the versions of babel-loader your are using. Try updating your package.json to this.

{
  "name": "webpack-howto-example",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-core": "^6.24.0",
    "babel-loader": "^6.4.1",
    "babel-preset-es2015": "^6.24.0",
    "babel-preset-react": "^6.23.0",
    "bundle-loader": "^0.5.0",
    "css-loader": "^0.9.0",
    "file-loader": "^0.7.2",
    "less": "^1.7.5",
    "less-loader": "^0.7.7",
    "style-loader": "^0.8.0",
    "url-loader": "^0.5.5",
    "webpack": "^2.3.2",
    "webpack-dev-server": "^2.4.2"
  },
  "dependencies": {
    "react": "^0.13.3",
    "react-router": "^0.13.3"
  }
}

Check out this PR that uses webpack 2.x.
Here is the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants