Closed ryanbillingsley closed 9 years ago
Esprima is unable to parse one of your files. Look for a malformed import statement.
@ef4 Is there anyway to narrow down where the offending import script could be?
You could patch a console.log into this point of that stack trace that tells you which file it's about to parse.
at parseImports (/Users/ryanbillingsley/Dev/gambit-client/node_modules/ember-browserify/lib/stub-generator.js:116:23)
@ef4 cool, i will give that a shot, thanks for the help
@ef4 Found it, it was an add-on. Thanks again for the help.
I'm going to leave this issue open so we can add a better error message here.
It happened to me too because of ember-cli-mirage upgrade. But it seems that the syntax is valid although the import parsing fails. The line is
import baseConfig, { testConfig } from '../mirage/config';
Just tried this with 1.0.1 (which now uses acorn instead of esprima) and it appears that acorn throws a much nicer error, complete with filename, line number, and column
File: dummy/components/feed-hero.js
dummy/components/feed-hero.js: Unexpected token (3:10)
SyntaxError: dummy/components/feed-hero.js: Unexpected token (3:10)
1 | import Ember from 'ember';
2 |
> 3 | importzzz from 'bad import statement';
| ^
4 |
5 | export default Ember.Component.extend({});
@ramybenaroya, can you upgrade to 1.0.1 and see if that fixes your import parsing error?
Works great after upgrading. Thanks.
Closing as the parsing imports error is fixed and we now have better error messages.
Updated to Ember 0.12.1 and started seeing this on start up:
Using 1.0.0