-
Notifications
You must be signed in to change notification settings - Fork 35
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 support: ReferenceError: navigator is not defined #14
Comments
@kybishop I am encountering a failing test when running not ok 7 Chrome 58.0 - Integration | Component | ember popper: it renders
---
actual: >
expected: >
template block text
stack: >
at Object.<anonymous> (http://localhost:7357/assets/tests.js:133:12)
at runTest (http://localhost:7357/assets/test-support.js:3295:30)
at Test.run (http://localhost:7357/assets/test-support.js:3281:6)
at http://localhost:7357/assets/test-support.js:3473:12
at Object.advance (http://localhost:7357/assets/test-support.js:2958:26)
at begin (http://localhost:7357/assets/test-support.js:4654:20)
Log: |
... |
Hey @scottwernervt, I haven't done too much work with Fastboot, but will start looking into this on Sunday. |
have you tried the most recent version of Popper.js? I don't think it should throw errors if imported in a non browser environment |
@FezVrasta Thanks for the heads up, I will try upgrading popper and running with fastboot. |
After upgrading App is being served by FastBoot
/home/swerner/development/ember-popper/tmp/broccoli_merge_trees-output_path-QjmQIBcg.tmp/assets/vendor.js:62791
if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
^
ReferenceError: navigator is not defined
at /home/swerner/development/ember-popper/tmp/src/popper/utils/debounce.js:7:20
at nativeHints (/home/swerner/development/ember-popper/tmp/broccoli_merge_trees-output_path-QjmQIBcg.tmp/assets/vendor.js:62769:19)
at /home/swerner/development/ember-popper/tmp/broccoli_merge_trees-output_path-QjmQIBcg.tmp/assets/vendor.js:62770:2
at ContextifyScript.Script.runInContext (vm.js:53:29)
at VMSandbox.eval (/home/swerner/development/ember-popper/node_modules/fastboot/src/vm-sandbox.js:14:14)
at /home/swerner/development/ember-popper/node_modules/fastboot/src/ember-app.js:142:15 |
I wonder why I don't know how FastBoot works, but if it's similar to React SSR then, |
Instructions
ember-popper
npm install
npm install ember-cli-fastboot --save-dev
ember serve
(depreciatedember fastboot --serve-assets
)References
I am working on a pull request for ember-popper and ember-attacher to eliminate errors thrown in fastboot sandbox.
The text was updated successfully, but these errors were encountered: