Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » cannot build git contacts
cannot build git contacts [message #1849909] Tue, 08 February 2022 11:50 Go to next message
Martin Wyser is currently offline Martin WyserFriend
Messages: 4
Registered: February 2022
Junior Member
I cloned the org.eclipse.scout.docs repo, and import the contacts directory. When I run "[contacts] all windows", I get this error:
[contacts] js build windows

Installing 'pnpm' into ../../node_modules

up to date, audited 2 packages in 948ms

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Running 'pnpm install' in C:\Users\myname\Projects\EclipseScout\org.eclipse.scout.docs\code
Der Befehl "node_modules\pnpm" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.


I have eclipse scout 2021-06, which is eclipse scout 22, a beta, on Java 11. I tried previous versions of eclipse scout, but they were all scout 22, down to 2019-12, which I could not run (does not accept any of my JREs).

I have a dedicated writable node installation in the path, with pnpm already installed. When I use a cmd.exe in the the code directory, I get

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @eclipse-scout/cli@11.0.0-snapshot

The latest release of @eclipse-scout/cli is "22.0.0-beta.5".

Other releases are:
  * alpha: 11.0.4-beta.2

If you need the full list of all 53 published versions run "$ pnpm view @eclipse-scout/cli versions".
Progress: resolved 3, reused 3, downloaded 0, added 0


What now?
Re: cannot build git contacts [message #1849921 is a reply to message #1849909] Tue, 08 February 2022 14:29 Go to previous messageGo to next message
Martin Wyser is currently offline Martin WyserFriend
Messages: 4
Registered: February 2022
Junior Member
I made some progress:

* find all files below directory code (the parent of contacts), grep for 11.0.0-snapshot, change that to 11.0.2.
* "pnpm install" in directory code

There were about 30 occurences of snapshot string.
I can now do "pnpm install" manually, but still in eclipse, the "all" run-configuration does not work. The server works, but not the ui server.

How do I do a js build manually?

[Updated on: Tue, 08 February 2022 14:57]

Report message to a moderator

Re: cannot build git contacts [message #1849949 is a reply to message #1849921] Wed, 09 February 2022 14:52 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi Martin

You are right, the 11.0 branch of the docs sample applications (https://github.com/bsi-software/org.eclipse.scout.docs/tree/releases/11.0/code/) is configured to use Scout 11.0.0-snapshot. This only works if you have a Scout runtime 11.0.0-snapshot locally as no snapshot dependencies are publish to npmjs.com.

If you want to use a fixed Scout release instead, you can
1. replace all "11.0-SNAPSHOT" strings in the pom.xml files to e.g. 11.0.42
2. replace all "11.0.0-snapshot" strings in package.json files to e.g. 11.0.42
Then you might need to do a Maven update in your IDE to fetch the corresponding version.

Then the docs repo is currently configured to install dependencies of all demo applications in one step. As you only want to build the contacts app, you can remove all lines starting with " - 'widgets" from the pnpm-workspace.yaml file in your "code" folder (above the contacts app). Then only one package should remain.

And finally, as you have already pnpm installed locally, you can remove the pnpm installation and use your local pnpm instead (please note that pnpm should be on your PATH). You can do that by modifying the "[contacts] js build.cmd" file as follows:
1. Remove the section named ":: Install pnpm". Most importantly the line "call npm install pnpm@ ..."
2. Change the line calling pnpm "call node_modules\pnpm install --ignore-scripts" to use the one on your PATH by removing the "node_modules\" so that it looks like "call pnpm install --ignore-scripts"

If you then start the "all" run configuration, does it work?

Generally to execute the js build manually you need to
1. have all dependencies installed. This can be done with the command "pnpm install --ignore-scripts"
2. starting the js build and the watcher for automatic hotcode replace with the command "npm run build:dev:watch" in the org.eclipse.scout.contacts.ui.html directory. Or use the script "build:dev" instead of "build:dev:watch" if you just want to build without starting the hotcode replace watcher. For a list of scripts check the package.json file.

Kind regards
Mat

[Updated on: Wed, 09 February 2022 14:54]

Report message to a moderator

Re: cannot build git contacts [message #1849996 is a reply to message #1849949] Thu, 10 February 2022 14:28 Go to previous messageGo to next message
Martin Wyser is currently offline Martin WyserFriend
Messages: 4
Registered: February 2022
Junior Member
Hi Mat

thanks a lot for your help! I tried your hints, and the contacts demo built without any trouble, in the command line, and then also in EclipseScout.

For fixing the version numbers: I ended up checking out the release branch (git checkout remotes/origin/features/version/11.0.42), and then all version numbers were ok. That did away with the need for fixing them all manually.

So thanks again, your help is very much appreciated!

Kind regards
Martin
Re: cannot build git contacts [message #1849997 is a reply to message #1849996] Thu, 10 February 2022 14:37 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi Martin

Yes, checking out features/version/11.0.42 is a very good solution as well! Thanks for sharing that.

It has the advantage, that you don't need to change any versions.

But it also has the disadvantage, that you are locked to that version. So any new updates or fixes are not available as long as you stay on that branch. By using the releases/11.0 branch you have to modify the versions but you also get fixes by just pulling again. So depending what you want to do, the one or other solution may be appropriate.

Regards
Mat
Re: cannot build git contacts [message #1850118 is a reply to message #1849997] Wed, 16 February 2022 20:09 Go to previous messageGo to next message
Martin Wyser is currently offline Martin WyserFriend
Messages: 4
Registered: February 2022
Junior Member
Hey, thanks for that hint, that is true.

It made me think about how to release, because the version needs fixing must be fixed, probably it is not good to develop on the main branch, and get a different state for each patch. But it is not really so important, I am just making a demo app for now.
Re: cannot build git contacts [message #1850134 is a reply to message #1850118] Thu, 17 February 2022 12:06 Go to previous message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi Martin

You are right. I would not recommend to use any snapshots for your own projects as snapshots are nightly builds (therefore change often) and are untested.

Instead I would recommend to always use fixed release versions for your applications and from time to time update to the latest release available. Then you can choose the moment you update and have the chance to do a retesting.

The demo applications in the docs repo on the other hand are mainly used to demonstrate and test the latest features. That's why they are configured to use the snapshot.

Kind regards
Mat
Previous Topic:How to add Content Security Policy frame-ancestors?
Next Topic:Alert "unsafe file upload" by upload to scout application
Goto Forum:
  


Current Time: Thu Apr 25 11:42:57 GMT 2024

Powered by FUDForum. Page generated in 0.03580 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top