I did the following to test your issues:
1) With a properly installed FPC+ Lazarus - with fpcupdeluxe -, startup fpcupdeluxe.
2) Go to the modules tab
3) select pas2js-rtl
4) select install module, this can take a looong time, be patient, be VERY patient on slow hardware!!!!!! Just learn to be patient.... Up to 15 minutes....on slow hardware like my old AMD two core.
5) select pas2js-ws
6) select install module, again be patient, very patient. By now you should have the patience I have for my wife and kids: endless

[edit] I am well over an hour in now for the old AMD, Pi is nearly finished.PATIENCE.
When finished you can select pas2js as target and use the pas2js widgets for design.
Actually, I am compiling for Raspberry Pi 4 too and that seems much faster, the compile cycle takes more cores. Starting up Raspberry Pi 5 later.
The process amounts to a humongous amount of re-compiling Lazarus, but it is hopefully a one time operation on fresh installs.
[edit]
succeeded on both the slowboat AMD as on the Pi4, Now starting RPi5....
succeeded too.
I only installed nodejs from
https://nodejs.org to make local applets. Do not forget to tick the box for install tools too. You need to add the path to nodejs.exe to the application or set the path globally.
This should do the trick.
Everything works out of the box. Let me know if there are still issues.