Kagami / gulp-ng-annotate

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: app.js: error: couldn't process source due to parse error Argument name clash (229:161)

d668 opened this issue · comments

commented

I have only 130 lines in app.js, so i can't understand where is the Argument name clash

commented

events.js:141
throw er; // Unhandled 'error' event
^

Try to comment entire file and uncomment it little by little to determine where the error is.

commented

i have about 50 files

commented

ok i found the file

commented

hm so i had $state injected twice in one of the files. But would be good to know the name though. Do you want to try to fix it? Or you want i close the issue?
thanks

If I understand correctly the problem is what you have error in one of the file but gulp-ng-annotate reports another? It would help if you make minimal reproducable example. Thanks.

commented

if you take any project and add
"use strict";
angular.module('app').controller('ArticleCtrl', function ( $scope,$timeout, $scope) {

you will get this message
Error: app.js: error: couldn't process source due to parse error
Argument name clash in strict mode (409:84)

Well, if I create only single file with these lines I get expected error that something is wrong on line 3.

commented

ok let me prepare an example. I am using a bunch of other plugins

Closing because of no activity. Feel free to provide additional info.