facebook

Definitions of the following identifiers conflict with those in another file

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #648431 Reply

    eric.r.glass
    Participant

    Getting this CodeMix Validation error, and can not get rid of it. There is only one TypeScript source file in the project and it is generating this error. How to turn off this annoying error?

    #648467 Reply

    Brian Fernandes
    Moderator

    Eric,

    This is an error that’s coming directly from the TS Language server. Did you start seeing this after a recent update to CodeMix or has it always been present – can you tell us what version of CodeMix you currently are on?

    On to the specific error, it seems to be something you will need to correct in your project’s dependencies – I did a bit of searching and found this link that talks about this, though there are many more that reference the same problem.
    https://stackoverflow.com/questions/55259962/error-ts6200-definitions-of-the-following-identifiers-conflict-with-those-in-an

    Also, I’m assuming you still need the TypeScript file to be correctly validated – or is this a lone file in the project that you don’t really work with (and validation, etc. could be turned off?)

    #648468 Reply

    eric.r.glass
    Participant

    I have CodeMix Release CI 2020.3.3 installed.

    There are no dependencies with the same identifiers. I actually saw that same stackflow issue and the resolution did not help.

    I deleted all of the generated JavaScript and maps, so only the TypeScript source was in the project and the CodeMix Validation error comes back.

    I would like to turn off TyepScript validation for this source file only, because I have other TypeScript source files in the same project that does not have the issue.

    Do you know what the steps to take to turn off TypeScript validation for a particular file?

    #648476 Reply

    Aaron Lara
    Member

    Hello Eric! You can exclude a file from validation. To do so:
    1. Right-click on your project.
    2. Select Properties.
    3. Navigate to CodeMix > Linting and Validation > Includes/Excludes.
    4. Add an exclusion rule for the specific file. The path should be relative to your project.

    Hope this helps.

    Cheers!
    Aaron Lara

    #648614 Reply

    eric.r.glass
    Participant

    I am sorry, but that did not help. CodeMix is still running the Lint/Validation on the file any time I open the file in the editor. When I close the CodeMix TypeScript editor the validation error for the file goes away. Attached is a zip file with a simple scaled down Eclipse project with just the TypeScript file getting the error.

    Attachments:
    You must be logged in to view attached files.
    #648629 Reply

    support-swapna
    Moderator

    Eric,

    Sorry that the validation exclusion does not help. We will look into it.
    Thank you for the project. I imported the project and see that the identifiers are declared at two places i.e in hearsgen.d.ts and hearsgen.ts.
    Looks like that is the conflict. Is there a way you can correct that conflict?

    –Swapna
    Genuitec Support

    #648631 Reply

    eric.r.glass
    Participant

    Hi, The file hearsgen.d.ts is in the gen folder and should be excluded, because it is part of the TypeScript transcompile to JavaScript process.

    #648677 Reply

    Aaron Lara
    Member

    So the file is excluded by default by another rule. Opening a file will always result in that file being validated (that’s also expected) but the errors will go away as soon as you close it.

    Taking a step back, are you having issues with this project or you just wanted to get rid of the error (ignore it)? Also, are you actively working with this file?

    #648680 Reply

    eric.r.glass
    Participant

    The error is invalid, and should not be created for the file. The project works fine and runs properly. The error marker while editing the file is annoying and improper information.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Definitions of the following identifiers conflict with those in another file

You must be logged in to post in the forum log in