Closed sly7-7 closed 6 years ago
Does a specific file trigger it? Can you extend your stacktrace so we can se where from the migrator code it comes from?
I can"t see which file trigger that, the problem is that it's the whole stack :( Is there an option to make the thing more verbose ? Or maybe can I put some debugging trace anywhere ?
You can set how many lines the stack is, by saying Error.StackTraceLimit = 1000 for example. It's 20 by default in v8
I'm getting this same error - did you figure it out @sly7-7
@jgadbois Unfortunately not. Though I will likely try again soon since I have to continue the migration. I will let you know if I find something.
I upgraded to latest version of recast in the migrator and that didn't help.
@igorT any suggestions? I added Error.StackTraceLimit = 1000
in the ember-cli-migrator binary and also in the specific file starting the stack trace and still got the short stack trace.
It's Error.stackTraceLimit
Here's the part of the stack trace coming directly from the migrator:
at Object.print (/usr/local/lib/node_modules/ember-cli-migrator/node_modules/recast/main.js:6:33)
at /usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:370:73
at Array.map (native)
at EmberMigrator.convertFile (/usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:370:38)
at EmberMigrator.processFile (/usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:341:36)
at /usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:172:10
at Array.forEach (native)
at EmberMigrator_run [as run] (/usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:171:32)
at Object.<anonymous> (/usr/local/lib/node_modules/ember-cli-migrator/bin/ember-cli-migrator:36:10)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
@sly7-7 I was able to fix by removing all the Sprockets import comments.
@jgadbois Thanks for the tip, really usefull :+1: @fivetanley Do you think ember-cli-migrator should take care of sprockets require directives ?
It seems odd that sprockets directives would blow it up as they are just JavaScript comments. Unless there's erb?
Sent from Outlook
On Tue, Sep 15, 2015 at 11:47 PM -0700, "Sylvain MINA" notifications@github.com wrote:
@jgadbois Thanks for the tip, really usefull
@fivetanley Do you think ember-cli-migrator should take care of sprockets require directives ?
— Reply to this email directly or view it on GitHub.
I think the only other change I made in my file was changing something like
var app = WT = Ember.Application...
to var app = Ember.Application...
I'm just about positive it was this file that was having problems.
@jgadbois I was finally able to find out what lines cause ember-cli-migrator to blow up:
// Ember.ArrayProxy.prototype.flatten = Array.prototype.flatten = function() { // var r = []; // this.forEach(function(el) { // r.push.apply(r, Ember.isArray(el) ? el.flatten() : [el]); // }); // return r; // };
Seems like having a double assignment in a line is bad.
Ok so it wasn't the directives then it was the double assignment which I had also.
I make an attempt of migrating the frontend part of my rails app to ember-cli. I encounter this error after the files were copied in the target directory.
I don't know where to start with to debug, all ideas are welcome :)