-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fastboot does not run with Babel browser polyfill #55
Comments
Probably related to #57. I'm assuming based on the name that babel-browser-polyfill relies on browser features that aren't available in Node. |
@topaxi Surely there's a version of the Babel polyfill designed to work in Node? Do you know which line you're getting the exception from? |
Any idea @thejameskyle? |
I setup a minimal clean repository here: https://github.com/topaxi/fastboot-test All I did was: ember new fastboot-test
ember install tildeio/ember-cli-fastboot#master
cp node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/browser-polyfill.js vendor/babel-browser-polyfill.js And updated the ember fastboot Which leads to:
Tested using iojs 2.4.0 and nodejs 0.12.4 |
Could you just like share the code that's causing the error in like a code snippet? I'm on a phone and a whole repo is not very minimal. |
I'm not a 100% sure, but I think it is here: https://github.com/topaxi/fastboot-test/blob/master/vendor/babel-browser-polyfill.js#L1894 // ...
},{"./$.def":13}],56:[function(require,module,exports){
'use strict';
var $ = require('./$')
, isObject = $.isObject
, isFunction = $.isFunction
, NUMBER = 'Number'
, $Number = $.g[NUMBER]
, Base = $Number
, proto = $Number.prototype; // <- This line right here!
function toPrimitive(it){
var fn, val;
if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val;
if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to number");
}
// ... |
@topaxi Have you had a chance to look into this more? |
Gonna close due to inactivity. Please continue the conversation if there are more details. |
…cument-title Deprecate setting title via `document.title`
Migrate to ESLint
Trying to run fastboot (master) with the babel-browser-polyfill crashes with:
My ember-cli-build.js looks roughly like this:
I'm not experienced enough with fastboot and contextify to debug this.
The text was updated successfully, but these errors were encountered: