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

Error in main.js when running: Module build failed: ReferenceError: [BABEL] #64

Open
mcalthrop opened this issue Mar 15, 2016 · 2 comments · May be fixed by #65
Open

Error in main.js when running: Module build failed: ReferenceError: [BABEL] #64

mcalthrop opened this issue Mar 15, 2016 · 2 comments · May be fixed by #65

Comments

@mcalthrop
Copy link

When I pull the latest code from the repo, install webpack globally, and run the example code, I get the following error message:

$ webpack

Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.12.14
Time: 1401ms
    + 1 hidden modules

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

Steps I took:

$ npm install -g webpack
$ cd example
$ npm install
$ webpack

Versions of node, npm and webpack installed:

$ node -v
v5.3.0
$ npm -v
3.3.12
$ webpack -v
Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.12.14
Time: 22ms
# then same error message as above
mcalthrop pushed a commit to mcalthrop/webpack-howto that referenced this issue Mar 15, 2016
@mcalthrop mcalthrop linked a pull request Mar 15, 2016 that will close this issue
@mcalthrop
Copy link
Author

Found the solution; details in the PR (#65).

@tomasky
Copy link

tomasky commented Aug 5, 2016

The same error

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

Successfully merging a pull request may close this issue.

2 participants