Kagami / gulp-ng-annotate

:pushpin: Add angularjs dependency injection annotations with ng-annotate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parse error thrown for reserved keyword

joshvito opened this issue · comments

When building my project with gulp default command I get the following error.
Not sure if this is related to this plugin or to the gulp-concat plugin.

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error in plugin 'gulp-ng-annotate'
app.js: error: couldn't process source due to parse error
The keyword 'static' is reserved (13001:4)
The keyword 'static' is reserved (13001:4)
    at transform (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\index.js:20:11)
    at Transform._transform (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\index.js:68:25)
    at Transform._read (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)
    at Transform._write (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:12)
    at doWrite (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:237:10)
    at writeOrBuffer (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:227:5)
    at Transform.Writable.write (C:\dev\trunk\TestReport\ui\node_modules\gulp-ng-annotate\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:194:11)
    at Stream.ondata (stream.js:51:26)
    at Stream.EventEmitter.emit (events.js:95:17)
    at Stream.endStream (C:\dev\trunk\TestReport\ui\node_modules\gulp-concat\index.js:90:10)

ng-annotate fails to parse your source file (app.js) due to this error:

The keyword 'static' is reserved (13001:4)
The keyword 'static' is reserved (13001:4)

Seems like you used reserved keyword static somewhere in your code.

thanks, found the problem. i added node_modules to my gulp build file by accident.