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

SyntaxError: ember-data-factory-guy/scenario.js: Unexpected token (6:21) #278

Closed
jakeonfire opened this issue Mar 22, 2017 · 8 comments
Closed

Comments

@jakeonfire
Copy link

since upgrading to 2.12.1 building my app raises an error:

File: ember-data-factory-guy/scenario.js
The Broccoli Plugin: [Babel] failed with:
SyntaxError: ember-data-factory-guy/scenario.js: Unexpected token (6:21)

import Ember from 'ember';
import FactoryGuy, { * as fgMethods } from 'ember-data-factory-guy';

var proxyFx = ['make', 'makeNew', 'makeList', 'build', 'buildList', 'mockFind', 'mockFindRecord', 'mockFindAll', 'mockReload', 'mockQuery', 'mockQueryRecord', 'mockUpdate', 'mockCreate', 'mockDelete'];

    at Parser.pp.raise (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/location.js:24:13)
    at Parser.pp.unexpected (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/util.js:82:8)
    at Parser.pp.parseIdent (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/expression.js:818:10)
    at Parser.pp.parseImportSpecifiers (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/statement.js:836:31)
    at Parser.parseImportSpecifiers (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/plugins/flow.js:926:13)
    at Parser.pp.parseImport (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/statement.js:796:10)
    at Parser.pp.parseStatement (/Users/jacob.frautschi/workspace/orange/dashboard/node_modules/babylon/lib/parser/statement.js:115:65)

so something to do with the import statement? doesn't happen with 2.12.0.

@danielspaniel
Copy link
Collaborator

interesting .. I just moved the ember-cli-babel package and moved it to dependencies, so something about the new babel package or ??
let me try it out and see what is the problem ... unless you can fix it first?

@jakeonfire
Copy link
Author

sorry, no time today...

@jakeonfire
Copy link
Author

i do think import * only works in the outer context... destructuring assignments and a wildcard feels weird, but can't confirm.

@jakeonfire
Copy link
Author

@danielspaniel
Copy link
Collaborator

danielspaniel commented Mar 22, 2017 via email

@jakeonfire
Copy link
Author

jakeonfire commented Mar 22, 2017

oh weird... the scenario.js source is different from that printed in the error. how is that the case? is it some intermediary, transpiled version?

can you build an ember project with ember-data-factory-guy 2.12.1?

is it possible that having different ember-cli-version's in different dependencies makes things weird?

@jakeonfire
Copy link
Author

i can tell you that with my project

  • npm install ember-data-factory-guy 2.12.0, ember build ✅
  • npm install ember-data-factory-guy 2.12.1, ember build 🚫

@danielspaniel
Copy link
Collaborator

fixed
https://github.com/danielspaniel/ember-data-factory-guy/releases/tag/v2.12.2
thanks for bringing this up .. really whacky

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