nickschot / ember-lux-starter-app

A quick Ember + Lux boilerplate with authentication.
15 stars 3 forks source link

Mysql db:seed error #3

Closed fiftoine closed 6 years ago

fiftoine commented 6 years ago

Hi,

On serverside, I switched to MySQL database and migration executed well (on Windows 10)

But when I want to seed

$ lux db:seed

I have the following error and no data is inserted :

TypeError: Cannot read property 'concat' of undefined
    at new Model (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:344:432)
    at new User (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:573:1)
    at F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:344:3932
    at Generator.next (<anonymous>)
    at step (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:72:30)
    at F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:90:14
    at new Promise (<anonymous>)
    at F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:69:12
    at run (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:344:4926)
    at Function.create (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:344:4976)
    at Proxy.create (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:302:125)
    at F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:781:37
    at Generator.next (<anonymous>)
    at step (F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:72:30)
    at F:\workspace\lux\ember-lux-starter-app\server\dist\bundle.js:90:14
    at new Promise (<anonymous>)
From previous event:
    at F:\workspace\lux\ember-lux-starter-app\server\node_modules\knex\lib\transaction.js:97:14
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
From previous event:
    at Transaction_MySQL2.Transaction (F:\workspace\lux\ember-lux-starter-app\server\node_modules\knex\lib\transaction.js:68:41)
    at new Transaction_MySQL2 (F:\workspace\lux\ember-lux-starter-app\server\node_modules\knex\lib\dialects\mysql2\transaction.js:33:25)
    at Client_MySQL2.transaction (F:\workspace\lux\ember-lux-starter-app\server\node_modules\knex\lib\dialects\mysql2\index.js:60:12)
    at Function.transaction (F:\workspace\lux\ember-lux-starter-app\server\node_modules\knex\lib\util\make-knex.js:75:21)
    at Database.then.store (E:\Users\Antoine\AppData\Roaming\npm\node_modules\lux-framework\src\packages\cli\commands\dbseed.js:23:22)
    at <anonymous>

node : 8.9.3 npm: 5.6.0

nickschot commented 6 years ago

I just saw you've filed an issue with lux. As this is definitely a lux related problem I'll close this issue and take a look there :)

ref: https://github.com/postlight/lux/issues/726

fiftoine commented 6 years ago

Thank you for the reference ;-)

It's definitively related to a Lux problem.

But when I create a new app with the driver mysql and I copy the server code of ember-lux-starter-app to this new app, the seeding is ok...

What could lead to this issue?

nickschot commented 6 years ago

Interesting! Dependencies maybe? (either knex or the mysql driver I guess) The deps in the starter app are likely more updated than those in a new lux app. I don't really have time to check it myself today though.