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

ember-power-datepicker doesn't get along with ember-cli-babili #17

Closed
pgengler opened this issue May 18, 2017 · 2 comments
Closed

ember-power-datepicker doesn't get along with ember-cli-babili #17

pgengler opened this issue May 18, 2017 · 2 comments

Comments

@pgengler
Copy link

I'm not sure that this isn't an ember-cli-babili issue but since is the only addon I've used so far that's had this issue, I figure at the very least you should be aware of it.

In short, when ember-power-datepicker is included in an app that uses ember-cli-babili (instead of ember-cli-uglify) and the config/targets.js file is configured to allow some native ES2015/ES2016 syntax (i.e., only targeting very modern browsers), the production build process fails.

Steps to reproduce (using ember-cli 2.13.1):

  • ember new babili-test
  • cd babili-test
  • npm uninstall --save-dev ember-cli-uglify
  • ember install ember-cli-babili
  • Edit config/targets.js to remove ie 9 (at this point, running ember build --env production will succeed)
  • ember install ember-power-datepicker
  • ember build --env production

The build fails with this error:

Build failed.
The Broccoli Plugin: [BabiliPlugin] failed with:
TypeError: assets/vendor.js: Cannot read property 'scope' of null
    at /Users/pgengler/tmp/babili-test/node_modules/babel-plugin-minify-simplify/lib/index.js:1504:42
    at Array.every (native)
    at genericEarlyExitTransform (/Users/pgengler/tmp/babili-test/node_modules/babel-plugin-minify-simplify/lib/index.js:1473:29)
    at earlyReturnTransform (/Users/pgengler/tmp/babili-test/node_modules/babel-plugin-minify-simplify/lib/index.js:1437:9)
    at PluginPass.exit (/Users/pgengler/tmp/babili-test/node_modules/babel-plugin-minify-simplify/lib/index.js:528:11)
    at newFn (/Users/pgengler/tmp/babili-test/node_modules/babel-traverse/lib/visitors.js:276:21)
    at NodePath._call (/Users/pgengler/tmp/babili-test/node_modules/babel-traverse/lib/path/context.js:76:18)
    at NodePath.call (/Users/pgengler/tmp/babili-test/node_modules/babel-traverse/lib/path/context.js:48:17)
    at NodePath.visit (/Users/pgengler/tmp/babili-test/node_modules/babel-traverse/lib/path/context.js:117:8)
    at TraversalContext.visitQueue (/Users/pgengler/tmp/babili-test/node_modules/babel-traverse/lib/context.js:150:16)

The broccoli plugin was instantiated at:
    at BabiliPlugin.Plugin (/Users/pgengler/tmp/babili-test/node_modules/broccoli-plugin/index.js:7:31)
    at BabiliPlugin (/Users/pgengler/tmp/babili-test/node_modules/broccoli-babili/lib/babili-plugin.js:12:5)
    at Class.postprocessTree (/Users/pgengler/tmp/babili-test/node_modules/ember-cli-babili/lib/index.js:25:14)
    at projectOrAddon.addons.reduce (/Users/pgengler/tmp/babili-test/node_modules/ember-cli/lib/utilities/addon-process-tree.js:6:25)
    at Array.reduce (native)
    at addonProcessTree (/Users/pgengler/tmp/babili-test/node_modules/ember-cli/lib/utilities/addon-process-tree.js:4:32)
    at EmberApp.addonPostprocessTree (/Users/pgengler/tmp/babili-test/node_modules/ember-cli/lib/broccoli/ember-app.js:586:12)
    at EmberApp.toTree (/Users/pgengler/tmp/babili-test/node_modules/ember-cli/lib/broccoli/ember-app.js:1691:17)
    at module.exports (/Users/pgengler/tmp/babili-test/ember-cli-build.js:22:14)
    at Builder.setupBroccoliBuilder (/Users/pgengler/tmp/babili-test/node_modules/ember-cli/lib/models/builder.js:56:19)

If you then revert config/targets.js (so that 'ie 9' is listed again) the build succeeds.

@cibernox
Copy link
Owner

cibernox commented May 18, 2017 via email

@pgengler
Copy link
Author

No, on this project I wasn't using ember-power-select. I tried the same steps as above but using ember-basic-dropdown and got the same result with that one, so I'll close this issue and open one there.

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

2 participants