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

Unable to theia browser app with external extension #372

Closed
nehashri opened this issue Aug 4, 2017 · 8 comments
Closed

Unable to theia browser app with external extension #372

nehashri opened this issue Aug 4, 2017 · 8 comments
Assignees
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help question user / developer questions
Milestone

Comments

@nehashri
Copy link

nehashri commented Aug 4, 2017

I am try to write an language extension with theia. I have created a extension package with extension.package.json.
And a example browser module with theia.package.json. The browser module uses the new extension as a local dependency and all other theia modules use npm package (0.1.1 version). The app is building fine but when I start off the example, I am getting an exception in the UI, Missing required @injectable annotation in: FrontendApplication.. The same extension seems to work when I tried add it with theia built from source. Is there some annotations missing in Theia which is causing this problem? I tried externalizing the python package too. Found the same error.

@akosyakov akosyakov added the question user / developer questions label Aug 4, 2017
@akosyakov
Copy link
Member

It could be related to how we import reflect-metadata for frontend but I would need to check.

In src-gen/frontend/index.js, you can try to move const { Container } = require('inversify'); down under const { FrontendApplication } = require('@theia/core/lib/browser'); that reflect-metadata is imported before inversify.

@nehashri
Copy link
Author

nehashri commented Aug 4, 2017

@akosyakov I tried pulling down const { Container } = require('inversify');. I am still getting the same error.

@kittaakos
Copy link
Contributor

@nehashri, you can reference a full-blown Theia extension here. We have created it for the YANG language. I hope it helps to resolve your issue.

@akosyakov
Copy link
Member

@nehashri ok, we will need to try out to build an app mixing published extensions with local to reproduce an issue.

@akosyakov akosyakov added the bug bugs found in the application label Aug 4, 2017
@nehashri
Copy link
Author

nehashri commented Aug 4, 2017

@kittaakos in the yang extension, theia is built as a submodule. That will is not what I am looking for, as I will not be able to use the theia's published extensions. We would like to use theia's published extensions instead of building it from source every time.
@akosyakov that's good. Hope this is resolved soon.

@nehashri
Copy link
Author

nehashri commented Aug 9, 2017

Any updates on this issue?

@akosyakov
Copy link
Member

@nehashri no chance to look at it so far, there is an issue to migrate the example project to the latest Theia with the setup similar you want to have: theia-ide/theia-xtext#4

Feel free to open a PR there. Such PR will help to investigate this issue.

@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Aug 27, 2017
@akosyakov akosyakov self-assigned this Sep 8, 2017
@akosyakov
Copy link
Member

@nehashri it should be fixed, you can see such example here: https://github.com/theia-ide/theia-extension-example

@svenefftinge svenefftinge added this to the Theia 1.0 BETA milestone Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help question user / developer questions
Projects
None yet
Development

No branches or pull requests

4 participants