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

Cannot run #46

Closed
d01010101 opened this issue Sep 23, 2020 · 10 comments
Closed

Cannot run #46

d01010101 opened this issue Sep 23, 2020 · 10 comments

Comments

@d01010101
Copy link

d01010101 commented Sep 23, 2020

The web server never shows. I am new to this, possibly the instructions are not detailed enough for the beginner.

Firstly, I unpack the zip from github and follow the instructions:

$ cd server
$ mvn install -U
$ cd ../client
$ nvm install 10
$ nvm use 10
$ npm install -g yarn
$ yarn rebuild:browser
---- it complaint that theia is not found
$ npm install theia
$ yarn rebuild:browser
---- now it complains that webpack and circular-dependency-plugin are missing
$ npm install webpack circular-dependency-plugin
$ yarn rebuild:browser
yarn run v1.22.5
$ theia rebuild:browser
No missing packages found!
Done in 0.25s.
$ cd browser-app
$ yarn start
yarn run v1.22.5
$ theia start
Done in 0.24s.

"Open http://localhost:3000 in the browser" - it does not work - "this site can’t be reached, localhost refused to connect"

@eneufeld
Copy link
Contributor

Hi @d01010101 ,

sorry for the confusing instructions. We will improve them.
Please do the following steps:

  • Go to the client folder.
  • Remove node_modules folder.
  • Run yarn

Now your client should be ready to be run the first time.
Go to browser-app and run yarn start

If you change code, you need to build this bundle as well as trigger yarn rebuild:browser.

@d01010101
Copy link
Author

I did these steps. I attach the log of the last step, yarn. However, there is still nothing at http://localhost:3000.

glsp.log

@CamilleLetavernier
Copy link
Member

Hi,
I've updated the client's README.md to avoid confusion. I've removed the rebuild: steps, as they can only be used after the first build (yarn)

Once the yarn build is successful, and if you've executed a mvn install in the server folder, you can move to the client/browser-app folder and run yarn start to start the application. Then, you should be able to navigate to http://localhost:3000 and start using the application.

@d01010101
Copy link
Author

d01010101 commented Oct 14, 2020

The client complains about theia missing. I installed it somehow previously, but despite that, the client never ran, so I do not want to repeat the exact method which I have used. What is the good way of installing a compatible version of theia?

@CamilleLetavernier
Copy link
Member

CamilleLetavernier commented Oct 14, 2020

You don't need to install theia. The glsp.log that you attached looks fine. Running yarn in the client folder is all you need.

Since you manually added some dependencies via npm (npm install theia according to your initial message), maybe this caused the repo to be in an inconsistent state? In that case, I would recommend clearing the git repo (git reset --hard && git clean -fdx) and trying again with the updated instructions:

# server build
cd server
mvn install

# client build
cd ../client
yarn

# application start (client + server)
cd browser-app
yarn start

@CamilleLetavernier
Copy link
Member

Btw, you may also want to make sure you're using the current master branch, as it contains an important server-side update to remain consistent with the GLSP Server dependency. Without this, the Maven build will likely fail. (You need commit 9aa9c0f or 08bc996

@d01010101
Copy link
Author

I downloaded today's snapshot and used the new instructions, and it works. It closes this issue, but I would like to ask before, if it is possible to embed within a web app only the drawing widget, without any IDE around it? I would like to tell it to load an ECORE file, then ask it for snapshots in the same format.

@CamilleLetavernier
Copy link
Member

It's possible, but probably requires a bit of glue code. The client side of Ecore GLSP comes with 2 main packages: sprotty-ecore, which only depends on GLSP + Sprotty (Diagram framework, independent from Theia), and theia-ecore which integrates the diagrams as a Theia Editor (With all the IDE integration such as opening the editor, adding menus, ...)

So it is possible to reuse the sprotty-ecore package only; but then you have to implement all the integration part yourself. The GLSP/Sprotty diagram can be integrated as a React component. I'm not sure we have any (recent) example of this, so I can't say how easy or complex that would be.

@d01010101
Copy link
Author

It would be enough for me to put it into an iframe and add a layer of simplified API (just new, load, save). It would be nice to have, as apart from Theia, the software would also be an interesting widget for the web. Perhaps I will give it a try one day, but I have no much idea about the emf cloud.

@JonasHelming
Copy link

We actually provide a stand-alone example: https://github.com/eclipse-glsp/glsp-client/tree/master/examples/workflow-standalone
Naturally it does not support all feaures due to not beeing integrated into an IDE, please see here for an overview:
https://github.com/eclipse-glsp/glsp#features

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

4 participants