Open techsoldaten opened 8 years ago
ember-cli-pretender throws an error when used with fastboot.
2016-06-30T03:13:47.773Z 500 Unknown Error: ReferenceError: document is not defined at parseURL (/ember/public/dist/fastboot/vendor.js:68010:16)
The offending code:
function parseURL(url) { // TODO: something for when document isn't present... #yolo var anchor = document.createElement('a'); anchor.href = url; anchor.fullpath = anchor.pathname + (anchor.search || '') + (anchor.hash || ''); return anchor; }
In Fastboot environment, I get this error Could not find modulepretenderimported from 'initializers/start-server'. In start-server.js, I tried to import pretender by import Pretender from 'pretender';
Could not find module
imported from 'initializers/start-server'
import Pretender from 'pretender';
ember-cli-pretender throws an error when used with fastboot.
2016-06-30T03:13:47.773Z 500 Unknown Error: ReferenceError: document is not defined at parseURL (/ember/public/dist/fastboot/vendor.js:68010:16)
The offending code:
function parseURL(url) { // TODO: something for when document isn't present... #yolo var anchor = document.createElement('a'); anchor.href = url; anchor.fullpath = anchor.pathname + (anchor.search || '') + (anchor.hash || ''); return anchor; }