Migration to titanium

@Sean and Servoy,
Thanks for the webinar about the migration today.

I just followed up by starting the migration of a ng client to ng2 titanium following the guide (Migrating to NG Titanium - Servoy Guides).
I do not have table view or lists so the changes were to the styles for custom servoy theme and the main style file.
Set the preferences as per the guide.
All packages and latest servoy release (2022.03.3742).
The project cleans and builds correctly.
Try to run the Ng client form the IDE - get a 404:

The requested resource [/solution/myProject/index.html] is not available

Nothing in the admin log.
Even did the tip from this posting from Johan: https://forum.servoy.com/viewtopic.php?f=8&t=23482

I next tried opening the titanium form editor (window | preferences| Servoy) but got a similar message:

The requested resource [/designer/solution/myProject/form/about/clientnr/2/index.html] is not available

So, @Sean, what am I missing?

Hi Tom,

Thanks for joining the webinar and trying Titanium right away!

It sounds like the Titanium sources maybe aren’t building. I’ll have to defer to our R&D team on this one.

Perhaps you could attach your workspace log in the meantime:
/.metadata/.log

Best,
Sean

OK - but all I see are a few issues related to http vs https

logsevenzip.txt (33.7 KB)

those logs don’t say anything
if you want to see if Titanium NGClient builds correctly then you need to look at your Console View
and that has now an extra Console page (Titanium NG Build Console) there you see everything the TiNG outputs when building

that needs to have at the end something like this:

  • Generating index html…
    √ Index html generation complete.

Initial Chunk Files | Names | Raw Size
vendor.js | vendor | 2.38 MB |
styles.css | styles | 746.68 kB |
polyfills.js | polyfills | 573.70 kB |
runtime.js | runtime | 14.87 kB |
main.js | main | 8.78 kB |

node_modules_numbro_languages_bg_js.js | - | 822 bytes | node_modules_numbro_languages_ro_js.js | - | 608 bytes |

Build at: 2022-04-13T14:30:50.570Z - Hash: 1b88bfefc1582a78 - Time: 37104ms

after that there can be a few warnings but those don’t matter

But if there is no output files generated then the TiNG will not work. (also the new designer will not work)
That needs to build correctly

So the errors in that console should be checked why it doesn’t build

consoleview.png

Ahh.
Ok so here is the ti console output.
Says there is a semver not found?
Not sure what that is.
Tom

ti_build_console.zip (1.32 KB)

hmm i did exactly what you did: (so all the same packages)

D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\node-v16.14.0-win-x64\node.exe
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\node-v16.14.0-win-x64\node_modules\npm\bin\npm-cli.js
install D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\bootstrapextracomponents\dist\servoy\bootstrapextracomponents
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\ngdesktopfile\dist\servoy\ngdesktopfile
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\ngdesktoputils\dist\servoy\ngdesktoputils
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\ngdesktopui\dist\servoy\ngdesktopui
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\customrenderedcomponents\dist\servoy\customrenderedcomponents
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\svyblockui\dist\servoy\svyblockui
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\bootstrapcomponents\dist\servoy\bootstrapcomponents
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\nggrids\dist\servoy\nggrids
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\ngclientutils
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\12grid\dist\12grid
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\servoydefault
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\dialogs
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\servoyextracomponents\dist\servoy\servoyextracomponents
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\svychartjs\dist\servoy\svychartjs
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\keylistener\dist\servoy\keylistener
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\packages@servoy\googlemaps\dist\servoy\googlemaps
D:\servoy_inst\2022.03_rc2_1\developer\ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window
–legacy-peer-deps

and that worked fine

you seem to be hit by this:

https://stackoverflow.com/questions/338 … ule-semver

So that sounds like a borked npm install, but that is very weird, we ship it and we don’t use anything of the system (as far as i know) and it should just find that npm we start…

what you can try is to exit developer
then delete:

Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\

that whole dir (or the contents of that dir, should be 2 dirs)

and then start developer again. that will create stuff right away in that dir and will then start building again

Did you already have an node/npm installed on your system?
on a command prompt if you just run:

npm --version
and
node --version

does that output something?

i checked my install and that “semver” module is there for me:

.metadata.plugins\com.servoy.eclipse.ngclient.ui\node-v16.14.0-win-x64\node_modules\npm\node_modules\semver

its part of the node that is installed…

No npm or node when try in command prompt.
The directory listing for the modules does not have semver - see the listing file atached.
I am guessing it is a partial module download.
Maybe that happened when I tried to update the Servoy version and it failed or partially worked?

I will try your suggestion of deleting that directory and rebuild.

dir_listing.txt (6.64 KB)

that seems an half way install
maybe you exit a developer at the time he was unzipping that in that dir…

and come to think of it, that maybe can happen quite easily
because when you update your developer, you get all the new plugins
then after restart you get another update (for application_server) that also says restart once more
that is often quite fast… So if you directly do restart and it was in the middle of unzipping maybe that will result in a half unzipped npm

The rebuild after deleting the directory took a long time (see attached).
But still got errors and will not launch the client.
Perhaps I should abandon the whole upgrade and download latest Servoy release again …all over again…

ti_build_console_2.zip (10.3 KB)

no reinstalling or doing a clean install will very likely not help one bit.

because the stuff just stays the same.

for some reason a simlink that npm wants todo doesn’t work (the first error)

ws.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\node_modules@servoy

that dir should have after the build a “window” junction… (same for a lot of others)

the second error seems to be a network problem to the npmjs registry…

but that the first already bombs out means what comes after will not really work…

There is no directory:

ws\.metadata\.plugins\com.servoy.eclipse.ngclient.ui\target\node_modules\@servoy

I downloaded the latest Servoy release to a new folder and selected the same workspace for my app.
This time that directory does show up.

The Titanium build console is attached and still gives errors.

I am guessing that some of the Servoy modules that are not Titanium upgraded might be causing the issues.
In the package manager these are the module/packages versions not prefixed by 2022.03.x
Servoy Ng Grid Services
Block UI
SvyLookup
SvyNavigation
SvyPopupFilter
SvySearch
SvySecurity
SvySecurityUx
SvyUtils

ti_build_console_new_download_4.zip (9.76 KB)

no you still have this problem:

In dir: Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target
npm ERR! code UNKNOWN
npm ERR! syscall symlink
npm ERR! path Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window
npm ERR! dest Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\node_modules@servoy\window
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, symlink ‘Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window’ → ‘Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\node_modules@servoy\window’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tom\AppData\Local\npm-cache_logs\2022-04-15T13_45_25_726Z-debug-0.log

that needs to be fixed first.

what is that Z drive? is that a network drive?

can you make sure the workspace is on a locale windows disk ?

or use the system or environment property: servoy.ng2.target.folder to redirect that target dir to another folder

like adding in the servoy.ini in the vm args section (so adding a line after -vmargs line)

-Dservoy.ng2.target.folder=c:/temp/target

then if you start the developer that directory should be created.

Drive Z is a network drive. That is where the workspace exists. It is fine for older NG.
I run the Servoy developer from drive K: (local SSD).
I changed the ini to the sample as you suggested but got same errors.

so then you really get the same errors but then with a K drive in the path?

then i don’t know what goes wrong at your system, because this is npm/node that can’t do something that i haven’t seen before. We just do an

“npm install path/to/somdir”

and then npm wants to makes a symbolic link to that dir from its root/node_modules dir

you can even do all this manually (but then its easier that you have npm/node installed)

with a command prompt go into this dir:

Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\

and run there

npm install Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window

that should then create a symbolic link to that dir in

Z:\Git_REPOS\ZumbaFunFitApp.metadata.plugins\com.servoy.eclipse.ngclient.ui\target\node_modules@servoy\

For the new Servoy version:
I installed nvm and npm, node myself.
Then ran

npm install Z:\Git_REPOS\ZumbaFunFitApp\.metadata\.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window

Got error message (-4094 from npm) as per attached.
Looks like it cannot create the symlink.
Looking at the log file there seems to be a reference to 2021.12.0 (line 34) - but this is 2022.03.0 - is there a mix up in directories someplace?
Maybe I should clear the npm cache and retry?..Nope same error.

2022-04-17T15_11_51_966Z-debug-0.zip (11.8 KB)

For my next experiment I exported the app (.servoy).
Then created a new workspace.
Imported the .servoy.
Changed the preferences to run ng client as titanium.
After waiting for he titanium build to complete (with various errors/warnings) I ran the ng client (debug) and it works now.
I conclude that having the workspace on a drive that is a network drive breaks the npm in some manner (maybe permissions?).

pitc:
For the new Servoy version:
I installed nvm and npm, node myself.
Then ran

npm install Z:\Git_REPOS\ZumbaFunFitApp\.metadata\.plugins\com.servoy.eclipse.ngclient.ui\target\projects\window

Got error message (-4094 from npm) as per attached.
Looks like it cannot create the symlink.
Looking at the log file there seems to be a reference to 2021.12.0 (line 34) - but this is 2022.03.0 - is there a mix up in directories someplace?
Maybe I should clear the npm cache and retry?..Nope same error.

Don’t think this has anything todo with npm cache or something
this has everything todo with npm wanting to create symbolic links (called Junctions in windows) and on that drive the OS/network doesn’t allow that
We depend on this that npm can do this.

pitc:
For my next experiment I exported the app (.servoy).
Then created a new workspace.
Imported the .servoy.
Changed the preferences to run ng client as titanium.
After waiting for he titanium build to complete (with various errors/warnings) I ran the ng client (debug) and it works now.
I conclude that having the workspace on a drive that is a network drive breaks the npm in some manner (maybe permissions?).

what kind of errors do you still get?
what does the console output still look like?

Also what i don’t get is if you use this:

-Dservoy.ng2.target.folder=c:/temp/target

(point to a normal ntfs filesystem drive on your local machine)

that it then still doesn’t work, that should work fine, where the workspace is shouldn’t be a problem i think, its where that target dir is
So what is the output you get when you have that system property set?

I deleted all sub-folders below c:\temp\target because of a previous attempt (otherwise it will not re-build).
With the ```
-Dservoy.ng2.target.folder=c:/temp/target

See attached log file.

Without that line, it attempts to use Drive Z and fails.
I can try with a different drive (e.g. K: where the servoy release is located.

[ti_build_console_5.zip|attachment](upload://q2K6cM0B9XGvjTtRFNi0vZppTvP.zip) (23 KB)