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

Fix for 'Module build failed: TypeError: Object.keys called on non-object' #82

Merged
merged 1 commit into from
Jul 4, 2015
Merged

Fix for 'Module build failed: TypeError: Object.keys called on non-object' #82

merged 1 commit into from
Jul 4, 2015

Conversation

bfanger
Copy link
Contributor

@bfanger bfanger commented Jul 4, 2015

Problem

I was running webpack from gulp and got:

Module build failed: TypeError: Object.keys called on non-object 
  at keys (native)
  at assign (eval at <anonymous> (../node_modules/gulp-traceur/node_modules/traceur/src/node/traceur.js:24:17), <anonymous>:2276:19)
  at Object.module.exports (.../node_modules/babel-loader/index.js:40:17)

Cause

The object-assign package returns the 'native' Object.assign' when it exists.
When using traceur@0.0.58 it creates an Object.assign implementation using Object.keys which fails with non-object values.

A workaround was to add require('babel-loader'); before var traceur = require('gulp-traceur'); in my gulpfile.

…ject'

 at keys (native)
 at assign (eval at <anonymous> (../node_modules/gulp-traceur/node_modules/traceur/src/node/traceur.js:24:17), <anonymous>:2276:19)
 at Object.module.exports (.../node_modules/babel-loader/index.js:40:17)

The object-assign package returns the 'native' Object.assign' when it exists.
When using traceur@0.0.58  it creates an Object.assign implementation using Object.keys which fails with non-object values.

A workaround was to add `require('babel-loader');` before `var traceur = require('gulp-traceur');` in my gulpfile.
@Couto Couto merged commit 9fe6bbc into babel:master Jul 4, 2015
@Couto
Copy link
Member

Couto commented Jul 4, 2015

❤️ this PR! :D
Thanks! I've merged this and it's already on npm with version 5.3.1

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 this pull request may close these issues.

2 participants