RangeError: Invalid array length
Closed this issue · 4 comments
SaladFork commented
Trying to run on an app that uses pods.
$ npm ls --depth=0 --global | grep ember-module-migrator
├── ember-module-migrator@0.6.6
$ ember-module-migrator
RangeError: Invalid array length
at Object.repeat (/usr/local/lib/node_modules/ember-module-migrator/node_modules/cli-table2/src/utils.js:16:10)
at Cell.<anonymous> (/usr/local/lib/node_modules/ember-module-migrator/node_modules/cli-table2/src/cell.js:138:15)
at /usr/local/lib/node_modules/ember-module-migrator/node_modules/lodash/index.js:2874:23
at /usr/local/lib/node_modules/ember-module-migrator/node_modules/lodash/index.js:3049:15
at Function.<anonymous> (/usr/local/lib/node_modules/ember-module-migrator/node_modules/lodash/index.js:3346:13)
at Cell.drawTop (/usr/local/lib/node_modules/ember-module-migrator/node_modules/cli-table2/src/cell.js:135:7)
at Cell.draw (/usr/local/lib/node_modules/ember-module-migrator/node_modules/cli-table2/src/cell.js:106:36)
at /usr/local/lib/node_modules/ember-module-migrator/node_modules/cli-table2/src/table.js:67:20
at arrayEach (/usr/local/lib/node_modules/ember-module-migrator/node_modules/lodash/index.js:1289:13)
at Function.<anonymous> (/usr/local/lib/node_modules/ember-module-migrator/node_modules/lodash/index.js:3345:13)
SaladFork commented
I realize the stack trace / error isn't the most helpful. Please let me know what I can do/provide to help with debugging this :)
cibernox commented
I also found the same error today.
Steps to reproduce.
- Clone https://github.com/cibernox/ember-power-select
- Checkout commit cibernox/ember-power-select@bb006cd (current master, I mention the commit in case master evolves and this errors is gone later)
- Run
ember-module-migrator
Environment:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.5
BuildVersion: 15F34
$ node -v
v6.2.0
$ npm -v
3.9.5
cibernox commented
I've found more weird behaviour but I assume that the early termination of the migration because of that error is the cause.
andyhot commented
Amazingly, this issue is really related to the console of your choice and specifically, its width! As coded, logger.js will fail if the width is an odd number (i was using tilda and my width was 115). The included PR fixes this