Whatever happened to Laserweb?

Hey, whatever happened to Laserweb? It looks like the main github fork is dormant and only 2 forks have activity from the last 6 months. I remember doing some bootstrap work on Laserweb 3. I know Anthony is gone and all, but I would think others would keep it going.

2 Likes

I tried to install bootstrap and failed, so maybe that is it? I know laserweb was never meant to require an internet connection. The procedure we had was to use ā€œnpm install bootstrapā€ and I forget the rest of how to get it started. That does not seem to work though. Really, not much of anything to do with that seems to work. I get messages about packages asking for funding too. That would probably scare off a number of people. I guess there are other ways to install bootstrap but I do not get why it does not work on npm from what I can tell.

1 Like

what Iā€™ve run into with npm is often related to the versions installed. And those messages for funding various packages have been around for a while so anyone seeing them now might be scared away but it would also indicate them being new to npm.

1 Like

Part one of two: Very TL;DR. Sorry all.

What LaserWeb is is two javascript programs; the laserweb web app itself and a server that connects to the machine, serves the web site out and accepts machine connections.

I did a lot of work during covid to bring some stuff into shape in the app; but failed to wrap it up adequately; the results are here: easytarget.org projects Ā· GitHub.

  • Iā€™m not 100% happy with what I did there; some of it got pointless, and there is a bug I never quite fixed (cannot re-order jobs in the panel)
  • The underlying architecture is tricky. It uses an older depreciated react framework and upgrading that is totally beyond my skills. I did a load of other upgrades and took react as far as I could but got blocked on it.
  • There is some hidden horrible; for example: there is a wasm gcode genrerator for milling operations in there that I cannot re-build, the published sources do not compile. It has debugging enabled and generates vast amounts of logs that crash the webapp if you try to generate large vcarve jobs. All I wanted to do was recompile without debug, what happened is I lost 2 days and got depressed.

There are other laserweb forks, some commercial, and Iā€™ve lost track of them.

Some changes have been done by @cprezzi to the mainline server component; mostly housekeeping. I am a contributor in the main LaserWeb project in github and can (in theory) get things moving there again.

And I also recently had some kind (PM) feedback from @malcolmmp and have been trying to work out a way forward; and have a planā€¦

2 Likes

Part Two of Two; still TL;DR

So Iā€™ve gotten hung up on stuff; Part of my hangup is there are multiple use models for laserweb:

  1. Running it as a local ā€˜appā€™ on a machine. This is what lots of ā€˜traditionalā€™ makers want and expect. An app they put on their (windows 10ā€¦sigh) laptop, connect via USB to the machine ,and it just works (and never changes because that breaks their workflow).
  2. Running as a client-server; the lw-comms-app (javascript based server) runs on a Pi or laptop connected to the machine via usb. You then browse to the server and run laserweb in your browser; including machine control via the server.
  3. Using the laserweb app without the server as a standalone website in your browser to generate gcode. Saving that to a local gcode file which is then uploaded/run via a (modern) firmwares web interface, or sent with UGS, gcode-streamer, pronterface or whatever.

Numbers 1) and 2) above are effectively the same; itā€™s just that the first uses the electron framework to run both the client and server together and wraps those in a web browser so they look like an ā€˜appā€™

The main App is OK; it still runs and I can still compile it; It need a couple of fixes and can be out as a new version. Pulling in anything useful from other forks is also good but not essential. The point is that once it is compiled (npm is horribleā€¦ I agree with @dougl itā€™s a mess to buildā€¦) it is then distributed as a ā€˜blobā€™ to the client; then just runs a http server to send the site to users web browser.

My goal is to largely ignore the App; and focus on the client side; with the goal of making LaserWeb easy to use again. That should help attract people who could then help with the appā€¦

So; My plan is to write something new; a Python based backend to replace lw-comm-server (which is Javascript); Iā€™m a bloody useless JS programmer, but a really good python one, and I can see the architecture in my head already.

  • the goal is to do exactly what lw-comm-server does; run as a service; server the app and do machine comms.
  • Itā€™s more complex than a simple ā€˜pipeā€™ for machine comms; the comm server has firmware specific features. This results in multiple a huge ā€˜caseā€™ statements in the current app. I want to modularize it properly. etcā€¦
  • I think this can be done using the standard C-Python libs, no requirements/dependencies at all.

This plan ignores the electron build and lw-comms-server; initial goal is repo that can be cloned, containing a copy of the app and a python server you can run. Properly documented.

2 Likes

As a final note; I actually talked to someone a lot about this recently; they basically said ā€˜play to your strengthsā€™.

I need help with the main app. All the dependency issues are due to being pegged to React (4?), lots of stuff coule be advanced if the core could be upgradedā€¦

But; if anyone weants to do that please start with my fork (GitHub - easytarget-org/LaserWeb4: Collaborative effort on the next version of LaserWeb / CNCWeb) since that is already more advanced than the mainline repo.

1 Like

@easytarget Your fork was one of the two forks that I mentioned.

I did notice that there was a react-bootstrap but that requires a link to an external copy of the javascript from what I could tell. I also can not tell if that means we would have to go through and adjust each piece of code or if the javascript files that the CDN(?) link being included is all we would really need. I know nothing about React, really. I do not know if the link contents could be downloaded or not.

I imagine that by specifying specific versions like bootstrap@3.4 (just pulling a number out of the air here) and all other npm installs involved would do the trick of compile issues or not. I saw something like 380+ files were included just trying to get bootstrap. That is much more than the react-bootstrap and indeed that is why they seem to have made react-bootstrap.

Python, huh? I know a bit of python myself. Check out my bucketmill.py project. I never gave it a GUI. It also just generates gcode. Numpy and scipy are used in it. I imagine cherrypy might be useful for serving up webpages and I know there is at least one USB interface library. There are also OpenGL libraries if you wanted to to pre-render. I think there might also be rendering libraries for HTML though. VRML and OpenGL.

I certainly canā€™t blame you for trying but not managing to finish. I have plenty of projects that I never polished up to a good public friendly version. Bucketmill.py for example. I would be more likely to thank you for keeping up the effort since it sounds like you may have made most of the effort on it for a while. I honestly never did get myself a laser cutter so I never got to use it myself. I did enjoy working on the project though.

I get some issues with docker doing ā€œnpm install -g npmā€ on Linux Mint. I do not run Windows. Commenting that out lets me move forward.

After ā€œdocker build --target dev -t laserweb4:dev .ā€ with that line commented out, it goes on for a bit and then I get

ERROR in ./components/machine-profiles.js 148:135-186
Module not found: Error: Can't resolve '../data/lw.machines/machines' in '/usr/src/app/src/components'
 @ ./components/settings.js 40:23-52
 @ ./components/laserweb.js 75:16-37
 @ ./index.js 24:16-48 93:21-61 108:4-57

ERROR in ./reducers/machine-profiles.js 24:3-68
Module not found: Error: Can't resolve '../data/lw.machines/machines' in '/usr/src/app/src/reducers'
 @ ./reducers/index.js 31:23-52
 @ ./index.js 44:11-40 107:4-46

ERROR in ./reducers/material-database.js 42:32-120
Module not found: Error: Can't resolve '../data/lw.materials/material-database.json' in '/usr/src/app/src/reducers'
 @ ./reducers/index.js 33:24-54
 @ ./index.js 44:11-40 107:4-46

ERROR in ./reducers/material-database.js 43:26-113
Module not found: Error: Can't resolve '../data/lw.materials/material-database.spec.json' in '/usr/src/app/src/reducers'
 @ ./reducers/index.js 33:24-54
 @ ./index.js 44:11-40 107:4-46

4 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.68.0 compiled with 4 errors and 1 warning in 18065 ms
The command '/bin/sh -c npm run bundle-dev' returned a non-zero code: 1

It might be easier to debug things if it mounted a docker volume in the github folder for a place to dump its logs and whatever. I honestly have a little trouble getting into the docker container to view the log files that it spits out. It might be nice if the docker containers had names too. laserweb4 and laserweb4-dev maybe. I am not honestly the best at Docker so maybe it is just me. Maybe it is because I am running on Linux and you are on Windows that I am having trouble too. Anyways, hopefully my feedback is useful.

Thankyyou @NathanielStenzel ,

Have you done a git submodule install, then update? IIRC (and I have not checked) these components come from submodules, which is why they are not found.

For completeness (and quickly, since I have to go out) here is how I build this:

I am on Fedora40, and I build nativelyā€¦ not in docker. I the same steps also build on a Raspberry PI (4).

$ pwd
/home/owen/LaserWeb/LaserWeb4

$ git remote -v
origin	git@github.com:easytarget-org/LaserWeb4.git (fetch)
origin	git@github.com:easytarget-org/LaserWeb4.git (push)

$ git submodule status
 db732e001ad58790e99d9a09d783841eb25972af src/data/lw.machines (heads/mill-settings)
 597c67324ea271d1883dcb33be892a3c8e24ca1b src/data/lw.materials (heads/v4.1)

$ uname -a
Linux sam.easytarget.org 6.11.5-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 22 19:13:11 UTC 2024 x86_64 GNU/Linux

$ node --version
v20.17.0

$ npm --version
10.8.2

$ npm run start-dev

> laserweb@4.1.0 start-dev
> webpack serve --progress --open --config webpack.dev.js

<w> [webpack-dev-server] "hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://10.0.0.140:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::a192:9729:5282:85a4]:8080/
<i> [webpack-dev-server] Content not from webpack is served from './dist' directory
<i> [webpack-dev-middleware] wait until bundle finished: /
assets by chunk 1.11 MiB (auxiliary name: main)
  assets by path *.svg 540 KiB 2 assets
  assets by path *.eot 182 KiB 2 assets
  assets by path *.ttf 206 KiB 2 assets
  assets by path *.woff 119 KiB 2 assets
  assets by path *.woff2 93 KiB 2 assets
assets by path *.js 13.4 MiB
  asset index.js 9.06 MiB [emitted] (name: main) 1 related asset
  asset a1b3fe0af0e09368b507.worker.js 1.87 MiB [emitted] [immutable] 1 related asset
  asset 3edb804718e7aa88df4c.worker.js 1.38 MiB [emitted] [immutable] 1 related asset
  asset 6d0de204e96098fc1c20.worker.js 574 KiB [emitted] [immutable] 1 related asset
  asset 1ab84df09c80dab4cfcd.worker.js 559 KiB [emitted] [immutable] 1 related asset
  asset 5e366d4941b7c9ae1495.worker.js 14.7 KiB [emitted] [immutable] 1 related asset
runtime modules 27.4 KiB 14 modules
modules by path ../node_modules/ 6.5 MiB
  javascript modules 6.5 MiB 1393 modules
  json modules 3.07 KiB
    ../node_modules/ajv/dist/refs/json-schema-draft-07.json 2.72 KiB [built] [code generated]
    ../node_modules/ajv/dist/refs/data.json 360 bytes [built] [code generated]
modules by path ./ 1.34 MiB
  javascript modules 1.3 MiB 132 modules
  json modules 44.7 KiB
    modules by path ./data/lw.machines/machines/ 13.1 KiB 13 modules
    modules by path ./data/lw.materials/ 31.4 KiB 3 modules
    ./data/macros.json 190 bytes [built] [code generated]
../package.json 3.42 KiB [built] [code generated]
./data/lw.machines/machines/ sync \.json$/ 425 bytes [built] [code generated]
webpack 5.70.0 compiled successfully in 14393 ms

This takes a minute to runā€¦ then opens a browser window running LaserWeb on my systemā€¦

When developing I use the ā€˜watch-devā€™ npm target.

2 Likes

Ok; so note that we are building the web app here; not the server part. npm run bundle-dev (not, currently bundle-prod) is used to build the app. The start-dev target builds the app then serves it locally for testing

The app bundle (nothing fancy, just a folder) is then put into the ā€˜webappā€™ folder of lw-comm-server, and served to clients via HTTP.


Sitting on a train with my Phone and a BT keyboard I have:

  • Remotely upgraded my laptop to Fedora 41 and verified everything still builds.
    • I did a fresh clone, npm install -f package.json then npm run bundle-dev and it all worked.
    • Welllllā€¦ actualllllly; I forgot the submodule update and got the same errors as youā€¦ so I can confirm that you need the submodule update! lol.
    • (offtopic: the upgrade was, yet again, flawless; dnf-system-update has gotten very good. And now I get the joys of dnf5.
  • I also did the same on a up-to-date PI4, that still does the full npm install and build too.
  • And then I verified it all works from scratch on Debian too; on my Vision5, which is a risc-v based machine.
1 Like

Quick note: The wiki mentions emailing Anthony Bolgar. I do not think that would get them anywhere.

1 Like

I dont think I have any access to that, but itā€™s a good point. Iā€™ll have a look-see.

The wiki and website should probably be checked to see how current the information is and if it all works. A project that is not straightforward about how to get started on the project is less likely to get new volunteers. Sadly, Cura is one of those projects that is impossible to get intoā€¦and they even have code from git pulling from a different repository which is blasphemy. I just mentioned them as an example though.

1 Like

FYI @cprezzi is his active handle if you want to reach him. I missed that the @Claudio_Prezzi account even existed. I should probably merge those accounts. Thatā€™s an artifact of the import from Google+ back in 2019. (After I merge them, this conversation will look confusing because it will also map the mentions of the two accountsā€¦ :sweat_smile:)

1 Like

Thank you for the note Michael, worth remembering.

Iā€™ve been a wally and avoided reaching out to Claudio enough; but I do notice he is more active on github than I am. Once Home Iā€™ll ping him and see what his thoughts are.

1 Like

Thanks for the heads up. I will review this thread again later from start to finish.

Also a good point.

@easytarget Even if you can not address the email address for Anthony on the main copy, it is also not pointing to someone who could receive the email on your fork. Errrā€¦noā€¦you do not have a wiki set up. That is the wiki that is on the main project and not your fork.

@easytarget Trying to step through your procedures for doing ā€œnpm run start-devā€, the src/data/lw.materials and src/data/lw.machines folders are empty. Am I supposed to manually go to the projects and git clone them into the data folder or what?

WARNING in ./components/machine-profiles.js 65:30-111
Module not found: Error: Can't resolve '../data/lw.materials/materials' in '/home/nathaniel/Programming/LaserWeb4/src/components'
 @ ./components/settings.js 40:23-52
 @ ./components/laserweb.js 75:16-37
 @ ./index.js 24:16-48 93:21-61 108:4-57

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

This is one of the sets of errors.