Skip to content

ember g pouch-adapter application breaks ember server with syntax error #261

@rotateLeft

Description

@rotateLeft

Issue

New to PouchDB and Ember. Following the instructions on https://github.com/pouchdb-community/ember-pouch.

When running the command "ember g pouch-adapter application", the Ember server breaks with an invalid syntax error:

Build Error (broccoli-persistent-filter:Babel > [Babel: pouch-data]) in pouch-data/adapters/application.js

/home/ember/pouch_data/pouch-data/adapters/application.js: Identifier 'config' has already been declared (33:7)

  31 |   }
  32 | });
> 33 | import config from 'pouch-data/config/environment';
     |        ^
  34 | import PouchDB from 'pouchdb';
  35 | import { Adapter } from 'ember-pouch';
  36 | import { assert } from '@ember/debug';


Stack Trace and Error Report: /tmp/error.dump.637edf5f490e357f59899b080ca803f2.log

Info

  • Environ:
    ember-cli: 3.17.0
    node: 12.16.1
    os: linux x64
    ember-pouch: 7.0.0
    Fedora 31 x64 VM

  • Adapter: IndexedDB ?

  • Server: PouchDB Server

Reproduce

ember new test_project
cd test_project
npm install pouchdb-server
ember install ember-pouch
ember g pouch-adapter application
ember serve

Contents of generated application adapter attached.
error.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions