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

add fastboot support for ember-pouch #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fivetanley
Copy link
Contributor

not ready to merge yet

let's cargo cult some conventions (or maybe not idk)

@fivetanley fivetanley force-pushed the fastboot-support branch 3 times, most recently from 522e727 to 97c24a2 Compare January 31, 2016 03:14
@backspace
Copy link
Collaborator

Exciting!

@fivetanley fivetanley force-pushed the fastboot-support branch 3 times, most recently from 00016a1 to ce1676b Compare January 31, 2016 04:19
@nolanlawson
Copy link
Member

Very interested in where this goes. :)

@srsgores
Copy link

srsgores commented Jun 7, 2016

Is there a reason why this isn't ready to be merged? What's needed in order to get this working?

@backspace
Copy link
Collaborator

@fivetanley specifically said

not ready to merge yet

for one!

@simonexmachina
Copy link
Collaborator

@fivetanley can we get an update on this please. What is required to get this moving forward/merged?

@broerse
Copy link
Collaborator

broerse commented Nov 28, 2016

If we switch to NPM like this #162 what is needed for FastBoot?

@stickbyatlas
Copy link

Hi folks - first time building a Fastboot-enabled application in Ember, and struggling to get PouchDB queries working on the server side. When I try to create a new PouchDB instance to communicate directly with a CouchDB 2.0 server over HTTP, I keep getting the following error:

ReferenceError: navigator is not defined
    at PouchDB$5.ajax [as _ajax] (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11080:1)
    at ajax$$1 (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11306:1)
    at PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11311:1
    at ajaxPromise (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11310:1)
    at setup (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11348:1)
    at PouchDB$5.HttpPouch.api._info (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11506:1)
    at PouchDB$5.<anonymous> (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:4949:1)
    at PouchDB$5.<anonymous> (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:2755:1)
    at PouchDB$5.<anonymous> (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:21:1)
    at PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:2694:1
    at PouchDB$5.<anonymous> (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:2681:1)
    at PouchDB$5.info (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:23:1)
    at Changes$2.doChanges (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:4150:1)
    at PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:4126:1
    at Object.validate (/Library/Server/Web/Data/Sites/Default/ccaa/backend-app/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:6378:1)
    at Changes$2.validateChanges (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:4122:1)
    at PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:4079:1
    at TaskQueue$1.execute (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:5139:1)
    at TaskQueue$1.ready (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:5152:1)
    at PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:5288:1
    at Array.<anonymous> (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:11374:1)
    at Timeout.nextTick [as _onTimeout] (PATH_TO_EMBER_APP/tmp/broccoli_merge_trees-output_path-sG1biyhi.tmp/assets/vendor/pouchdb/pouchdb.js:782:1)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)

I'm using an unadulterated install of ember-pouch, which brings down the kitchen-sink version of PouchDB I believe. This version uses browser-based AJAX libraries, and doesn't selectively switch to node libraries when they're not available. Is there an easy workaround to this that I'm missing?

@broerse
Copy link
Collaborator

broerse commented Aug 29, 2017

@stickbyatlas We switched from loading pouchdb in bower to loading the browserified bundel from pouchdb. We should switch to the node version depending on a fastboot check. Not sure how to write test for this. Hope is works?? @fivetanley do you have time to change this PR depending on the new NPM only ember-pouch ?

@broerse
Copy link
Collaborator

broerse commented Jul 18, 2018

@fivetanley What do you want to do with this PR. Make it your summer project ;-)

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.

None yet

7 participants