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

Asset compilation fails (Duplicate index signature) #3715

Closed
Glutexo opened this issue Apr 4, 2018 · 4 comments
Closed

Asset compilation fails (Duplicate index signature) #3715

Glutexo opened this issue Apr 4, 2018 · 4 comments

Comments

@Glutexo
Copy link
Member

Glutexo commented Apr 4, 2018

Assets do not compile for me with fresh clone (a63c3559b) of manageiq-ui-classic. Running bundle exec rake update:ui, TypeScript complains about duplicate index signature:

ERROR in /Users/stomsa/Vývoj/ManageIQ/Repozitáře/manageiq-ui-classic/node_modules/@types/angular/jqlite.d.ts
(29,5): error TS2375: Duplicate number index signature.

ERROR in /Users/stomsa/Vývoj/ManageIQ/Repozitáře/manageiq-ui-classic/node_modules/@types/angular/jqlite.d.ts
(811,5): error TS2374: Duplicate string index signature.

My rather uninformed guess is that angular-mocks is the culprit: The error is signaled in the /node_modules/@types/angular/jqlite.d.ts, but there is also /node_modules/@types/angular-mocks/node_modules/@types/angular with the same jqlite.d.ts file. Maybe this is somehow causing the conflict?

With a workaround based on @himdel ’s suggestion, assets are compiled and rake command succeeds if I remove @types/angular and @types/angular-mocks from "devDependencies" in package.json. Removing only @types/angular-mocks does not help.

You can see the standard output and the Yarn error log here: https://gist.github.com/Glutexo/570548c450e4474ef8b9c86819952b6d

Happens on macOS – Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64

@himdel
Copy link
Contributor

himdel commented Apr 4, 2018

Can't reproduce, even with a fresh install.

Do you have a yarn.lock I can reproduce this with?

@Glutexo
Copy link
Member Author

Glutexo commented Apr 5, 2018

@himdel I added a yarn.lock to the Gist mentioned: https://gist.github.com/Glutexo/570548c450e4474ef8b9c86819952b6d#file-yarn-lock It is a fresh one – I deleted the one I had and ran bundle exec rake update:ui.

@Glutexo
Copy link
Member Author

Glutexo commented Apr 5, 2018

Oh. :( Commented 5 minutes after this issue being solved by removing the dependencies.

@himdel
Copy link
Contributor

himdel commented Apr 5, 2018

Must be something obscure :) Tried your yarn.lock and still nothing.

But, hopefully this is fixed by the removal now :)

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