fivetanley / ember-cli-migrator

migrate your files to the standard ember-cli structure, preserving git history
MIT License
106 stars 22 forks source link

ember-cli-migrator “Do not know how to import App” error #71

Open DoryZi opened 9 years ago

DoryZi commented 9 years ago

0 down vote favorite I'm migrating a custom made Ember project (I do not use a build system, but actually created my own grunt script). When I run ember-cli-migrate but I'm getting the following error:

Git Move Moving templates/users.hbs to app\templates\users.hbs Do not know how to import App Do not know how to import App Do not know how to import App Do not know how to import App Do not know how to import App Do not know how to import App Do not know how to import App Do not know how to import App

assert.js:86 throw new assert.AssertionError({ ^ AssertionError: {kind: var, declarations: [object Object], loc: null, type: Vari ableDeclaration, comments: null} does not match field "init": Expression | null of type VariableDeclarator at add (c:\Users\DoryZ\AppData\Roaming\npm\node_modules\ember-cli-migrator\n ode_modules\recast\node_modules\ast-types\lib\types.js:525:28) at c:\Users\DoryZ\AppData\Roaming\npm\node_modules\ember-cli-migrator\node_m odules\recast\node_modules\ast-types\lib\types.js:539:17 at Array.forEach (native) at Object.defineProperty.value as variableDeclarator at Context.MigratorVisitorPrototype.visitAssignmentExpression (c:\Users\Dory Z\AppData\Roaming\npm\node_modules\ember-cli-migrator\lib\migrator-visitor.js:71 :67) at Context.invokeVisitorMethod (c:\Users\DoryZ\AppData\Roaming\npm\node_modu les\ember-cli-migrator\node_modules\recast\node_modules\ast-types\lib\path-visit or.js:306:43) at Visitor.PVp.visitWithoutReset (c:\Users\DoryZ\AppData\Roaming\npm\node_mo dules\ember-cli-migrator\node_modules\recast\node_modules\ast-types\lib\path-vis itor.js:180:28) at NodePath.each (c:\Users\DoryZ\AppData\Roaming\npm\node_modules\ember-cli- migrator\node_modules\recast\node_modules\ast-types\lib\path.js:96:22) at visitChildren (c:\Users\DoryZ\AppData\Roaming\npm\node_modules\ember-cli- migrator\node_modules\recast\node_modules\ast-types\lib\path-visitor.js:199:14) at Visitor.PVp.visitWithoutReset (c:\Users\DoryZ\AppData\Roaming\npm\node_mo dules\ember-cli-migrator\node_modules\recast\node_modules\ast-types\lib\path-vis itor.js:188:16) any help would be appreciated..

and this is what user.hbs looks like:

{{outlet}}
I've also opend this on stackoverflow: http://stackoverflow.com/questions/30999440/ember-cli-migrator-do-not-know-how-to-import-app-error
fivetanley commented 9 years ago

There's a chance that it's processing the compiled handlebars file maybe. Without seeing more of the source code I'm not sure what's happening here sorry. The migrator should not be parsing handlebars files.