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

Clean checkout is failing to build: "Unknown option: direct.console" #577

Closed
davewasmer opened this issue Aug 23, 2016 · 7 comments
Closed

Comments

@davewasmer
Copy link
Contributor

Following the instructions in the Readme, I checked out the repo and ran:

$ npm install && npm install -g ember-cli && npm install -g bower && bower install && npm install -g grunt-cli

And got this output:

> ember-inspector@2.0.0 build /Users/daw/projects/ember-inspector
> ember build

DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `release`
    at /Users/daw/projects/ember-inspector/node_modules/ember-cli/lib/models/project.js:408:38
⠋ BuildingSmoke-and-mirrors:: Including Vertical-Collection Debug CSS
DEPRECATION: ember-cli-test-loader should now be included as an NPM module with version 1.1.0 or greater.
Build failed.
File: modules/ember-async-image/components/async-image.js
The Broccoli Plugin: [object Object] failed with:
ReferenceError: [BABEL] modules/ember-async-image/components/async-image.js: Unknown option: direct.console
    at Logger.error (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.init (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/file/options/option-manager.js:216:10)
    at File.initOptions (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/Users/daw/projects/ember-inspector/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at Babel.transform (/Users/daw/projects/ember-inspector/node_modules/broccoli-babel-transpiler/index.js:39:21)
    at Babel.processString (/Users/daw/projects/ember-inspector/node_modules/broccoli-babel-transpiler/index.js:51:15)
    at Babel.Filter.processFile (/Users/daw/projects/ember-inspector/node_modules/broccoli-babel-transpiler/node_modules/broccoli-filter/index.js:136:31)
    at /Users/daw/projects/ember-inspector/node_modules/broccoli-babel-transpiler/node_modules/broccoli-filter/index.js:85:21

The broccoli plugin was instantiated at:
undefined


npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/daw/.nvm/versions/node/v5.10.0/bin/node" "/Users/daw/.nvm/versions/node/v5.10.0/bin/npm" "run" "build"
npm ERR! node v5.10.0
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE
[... the rest of the usual npm lifecycle error ...]
@rwjblue
Copy link
Member

rwjblue commented Aug 23, 2016

Ok, so this is both my fault and annoying.

Basically, broccoli-babel-transpiler's options are intermixed with the options passed into the Babel instance that the broccoli plugin wraps. This means that anytime we add a new argument for the plugin the plugin must also delete the argument before passing the options through to Babel.

@rwjblue
Copy link
Member

rwjblue commented Aug 23, 2016

We added a console option in a recent version of ember-cli-babel. It has to be paired with the right broccoli-babel-transpiler version for it to not blow up like the error you pasted above.

I suspect (hard to check while on mobile) that we have pinned broccoli-babel-transpiler to a version that doesn't account for removing 'console'. Can you check? If that is the issue, we should be able to fix by bumping to the latest 5.x release of broccoli-babel-transpiler.

@elbeezi
Copy link

elbeezi commented Aug 23, 2016

I'm getting the same error message as OP.

broccoli-babel-transpiler is currently pinned to 5.1.0. that version does seem to handle console gracefully, though: https://github.com/babel/broccoli-babel-transpiler/blob/199235312474440fecdefd1181b3dd0d8072fed3/index.js#L39

@elbeezi
Copy link

elbeezi commented Aug 23, 2016

Updating broccoli-babel-transpiler locally to 5.5.0 fixed it for me

@rwjblue
Copy link
Member

rwjblue commented Aug 23, 2016

Ya, 5.1.0 link is here: https://github.com/babel/broccoli-babel-transpiler/blob/v5.1.0/index.js#L21-L30, and it doesn't handle delete options.console properly.

@elbeezy - Mind sending a PR?

@elbeezi
Copy link

elbeezi commented Aug 23, 2016

oops, yeah i was looking at master >.<

PR incoming

@davewasmer
Copy link
Contributor Author

Thanks all!

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