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-test-helpers throws error after upgrade #204

Closed
alexlafroscia opened this issue May 7, 2017 · 6 comments
Closed

ember-test-helpers throws error after upgrade #204

alexlafroscia opened this issue May 7, 2017 · 6 comments

Comments

@alexlafroscia
Copy link
Contributor

I'm working on getting ember-ajax's dependencies updated, and ran across the following when upgrading ember-cli-mocha from 0.13.3 to 0.14.2.

Build failed.
File: ember-test-helpers/build-registry.js
The Broccoli Plugin: [Babel] failed with:
TypeError: ember-test-helpers/build-registry.js: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
    at Object.validate (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-types/lib/definitions/index.js:109:13)
    at Object.validate (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-types/lib/index.js:505:9)
    at NodePath._replaceWith (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/replacement.js:176:7)
    at NodePath._remove (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/removal.js:58:10)
    at NodePath.remove (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/removal.js:30:8)
    at PluginPass.CallExpression (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-plugin-transform-es2015-modules-amd/lib/index.js:42:12)
    at NodePath._call (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/context.js:76:18)
    at NodePath.call (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/context.js:48:17)
    at NodePath.visit (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/path/context.js:105:12)
    at TraversalContext.visitQueue (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/babel-traverse/lib/context.js:150:16)

The broccoli plugin was instantiated at:
    at Babel.Plugin (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/broccoli-plugin/index.js:7:31)
    at Babel.Filter [as constructor] (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/broccoli-persistent-filter/index.js:60:10)
    at new Babel (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/broccoli-babel-transpiler/index.js:35:10)
    at Babel (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/broccoli-babel-transpiler/index.js:30:12)
    at Class.transpileTree (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/ember-cli-babel/index.js:38:48)
    at Object.registry.add.toTree (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/ember-cli-babel/index.js:45:30)
    at /Users/alexlafroscia/Code/ember/ember-ajax/node_modules/ember-cli-preprocess-registry/preprocessors.js:180:26
    at Array.forEach (native)
    at processPlugins (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/ember-cli-preprocess-registry/preprocessors.js:178:11)
    at Function.module.exports.preprocessJs (/Users/alexlafroscia/Code/ember/ember-ajax/node_modules/ember-cli-preprocess-registry/preprocessors.js:171:10)

For some reason, the problem does not take place in CI. Any ideas on what the problem might be?

@alexlafroscia
Copy link
Contributor Author

I thought the issue might be that some dependencies had ember-cli-babel@5 and some used ember-cli-babel@6, so I removed anything still depending on version 5 but that didn't help. I also switched to Node 4 on my local machine, to match what's running in CI, but that didn't fix the problem either.

@Turbo87
Copy link
Member

Turbo87 commented May 7, 2017

@alexlafroscia my guess is that what you're seeing is fixed by emberjs/ember-test-helpers#198, but you're still relying on an older version of ember-test-helper because the dependency wasn't updated in ember-cli-mocha. I'll update that dep and then do a patch release.

@alexlafroscia
Copy link
Contributor Author

Awesome, thanks @Turbo87!

@Turbo87
Copy link
Member

Turbo87 commented May 7, 2017

releasing via Travis as v0.14.3. should be up in a couple of minutes. :)

@alexlafroscia
Copy link
Contributor Author

thanks again 🎉

@alexlafroscia
Copy link
Contributor Author

That fixed it! Thanks

alexlafroscia added a commit to ember-cli/ember-ajax that referenced this issue May 7, 2017
Upgrade fixes ember-cli/ember-cli-mocha#204, which was preventing the
tests from passing locally.

Closes #299
alexlafroscia added a commit to ember-cli/ember-ajax that referenced this issue May 7, 2017
Upgrade fixes ember-cli/ember-cli-mocha#204, which was preventing the
tests from passing locally.

Closes #299
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