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

Example in README does not work #16

Closed
dbkaplun opened this issue Nov 23, 2015 · 2 comments
Closed

Example in README does not work #16

dbkaplun opened this issue Nov 23, 2015 · 2 comments

Comments

@dbkaplun
Copy link

> var knex = require('feathers-knex');
undefined
> var todos = knex('todos', {
...   dialect: 'sqlite3',
...   connection: {
.....     filename: './data.db'
.....   }
... });
TypeError: knex is not a function
    at repl:1:13
    at REPLServer.defaultEval (repl.js:164:27)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:393:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)
    at REPLServer.Interface._line (readline.js:549:8)
    at REPLServer.Interface._ttyWrite (readline.js:826:14)
    at ReadStream.onkeypress (readline.js:105:10)
    at emitTwo (events.js:87:13)
    at ReadStream.emit (events.js:172:7)
    at emitKeys (readline.js:1250:14)
    at next (native)
    at ReadStream.onData (readline.js:918:36)
@daffl
Copy link
Member

daffl commented Nov 23, 2015

You are indeed correct. We only tested it with ES6 and Babel which uses a default export called .default. I published a new version (1.2.1) that should fix the issue.

@daffl daffl closed this as completed Nov 23, 2015
@daffl
Copy link
Member

daffl commented Nov 23, 2015

Actually, although this will work, it should probably really use https://www.npmjs.com/package/babel-plugin-add-module-exports. Reopening to make another release with that plugin.

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

No branches or pull requests

2 participants