Building gSender

Let us know how it goes. Depending on how you set the container up you might have to refer to that original github post to copy the build output from the container to your filesystem.

On another note - this linter is annoying! I do not write the way it wants things.. like putting a closing curly brace on the same line as an else..

if(blah) {
//..
} else {
//..
}
1 Like

Here’s my steps that are failing.

  1. Install Node v20
  2. Clone gsender repo, from root gsender folder, checkout branch of your choice (eg dev)
  3. yarn install
  4. yarn build
  5. cd dist/gsender
  6. yarn install
  7. npm install --save @electron/remote
$ npm install electron
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: react-dom@19.1.0
npm error Found: react@18.3.1
npm error node_modules/react
npm error   peer react@">=16.8.0" from @emotion/react@11.14.0
npm error   node_modules/@emotion/react
npm error     @emotion/react@"^11.8.1" from react-select@5.10.1
npm error     node_modules/react-select
npm error       react-select@"*" from @types/react-select@5.0.1
npm error       node_modules/@types/react-select
npm error         dev @types/react-select@"^5.0.1" from the root project
npm error   peer react@">=16.8.0" from @emotion/use-insertion-effect-with-fallbacks@1.2.0
npm error   node_modules/@emotion/use-insertion-effect-with-fallbacks
npm error     @emotion/use-insertion-effect-with-fallbacks@"^1.2.0" from @emotion/react@11.14.0
npm error     node_modules/@emotion/react
npm error       @emotion/react@"^11.8.1" from react-select@5.10.1
npm error       node_modules/react-select
npm error         react-select@"*" from @types/react-select@5.0.1
npm error         node_modules/@types/react-select
npm error   9 more (@sentry/react, @tanstack/react-router, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^19.1.0" from react-dom@19.1.0
npm error node_modules/react-dom
npm error   peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router@1.121.0
npm error   node_modules/@tanstack/react-router
npm error     peer @tanstack/react-router@"^1.121.0" from @tanstack/react-router-devtools@1.121.0
npm error     node_modules/@tanstack/react-router-devtools
npm error       @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error       node_modules/@tanstack/router-devtools
npm error     2 more (@tanstack/router-devtools, @tanstack/router-plugin)
npm error   peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router-devtools@1.121.0
npm error   node_modules/@tanstack/react-router-devtools
npm error     @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error     node_modules/@tanstack/router-devtools
npm error       dev @tanstack/router-devtools@"^1.46.7" from the root project
npm error   4 more (@tanstack/react-store, @tanstack/router-devtools, ...)
npm error
npm error Conflicting peer dependency: react@19.1.0
npm error node_modules/react
npm error   peer react@"^19.1.0" from react-dom@19.1.0
npm error   node_modules/react-dom
npm error     peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router@1.121.0
npm error     node_modules/@tanstack/react-router
npm error       peer @tanstack/react-router@"^1.121.0" from @tanstack/react-router-devtools@1.121.0
npm error       node_modules/@tanstack/react-router-devtools
npm error         @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error         node_modules/@tanstack/router-devtools
npm error       2 more (@tanstack/router-devtools, @tanstack/router-plugin)
npm error     peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router-devtools@1.121.0
npm error     node_modules/@tanstack/react-router-devtools
npm error       @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error       node_modules/@tanstack/router-devtools
npm error         dev @tanstack/router-devtools@"^1.46.7" from the root project
npm error     4 more (@tanstack/react-store, @tanstack/router-devtools, ...)
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\Greg\AppData\Local\npm-cache\_logs\2025-06-11T01_41_56_043Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\Greg\AppData\Local\npm-cache\_logs\2025-06-11T01_41_56_043Z-debug-0.log

You built the exe before right? I noticed you didn’t run yarn prepare (that wipes out the previous build). This is what is working for me

(In container terminal)

yarn prepare
yarn install
yarn prebuild-latest
yarn lint
yarn build

(In local terminal - cwd dist/gsender)

yarn install
npm install --save @electron/remote
npx electron-packager . RiftCoderGsender --platform=win32 --arch=x64

Bingo, thx. I had used my fork and didn’t pull the latest from upstream!

Compiled and working. I wonder if they’d accept a PR to add @electron/remote to their config.

1 Like

Great! Yeah I would think they would.. but I don’t know the package managers well enough to fix that at the moment - it’s in the dependencies in package.json but for some reason it’s getting left out. They have 50 different build targets.. and many of those invoke scripts.. so I imagine it might take some effort to unravel.

Success! Thanks to your instructions this was not very hard to do.

It took me about six hours but that’s only because I run a source based system. It took awhile to update my kernel config and then when I got to the first npm command I found out that my nodejs was built without npm. Node takes an hour and half to compile on my system because Google’s V8 engine is huge. The next build will be much quicker.

I opted to not use VSCode so I had to look up some Docker commands. This was my first foray with Docker so I learned a lot.

System Info:

linux kernel gentoo-6.12.31
docker 28.0.1
nodejs 22.13.1
yarn 1.22.22

Commands:

# building from scratch
mkdir gSender_build && cd gSender_build
printf "FROM node:18-bullseye\n" >> Dockerfile
docker build -t gsender-docker-image .

# run the container and start bash
docker run -it --entrypoint /bin/bash --name gsender-docker-container gsender-docker-image

# subsequent builds can start here using the existing gsender-docker-image
docker run -it --entrypoint /bin/bash gsender-docker-image

# skip on subsequent builds
git clone https://github.com/Sienci-Labs/gsender.git gsender

cd gsender
yarn prepare
yarn install
yarn prebuild-latest
yarn lint
yarn build

# now back in host terminal CWD=gSender_build
docker cp gsender-docker-container:/gsender/dist .
docker cp gsender-docker-container:/gsender/bin .
cd dist/gsender
yarn install
npm install electron
npm install electron-packager
npm install --save @electron/remote
npx electron-packager . my-gSender --platform=linux --arch=x64

Thanks again for your help! Now I just need to learn JS and gSender’s code base :laughing:

That’s awesome Michael. I’m sure some folks will be very happy you’ve got a Linux build setup working and documented. It’s good that it is so similar.

1 Like

Let’s pretend I have the ability to make a useful contribution to gSender. Who knows, it might even be true!

With that it mind I was thinking about how best to set things up. This is my plan.

  • Fork Sienci’s repo on GitHub
  • Clone that to my machine and create a branch for my work
  • The build process then clones my local repo
  • If my changes are good merge to master, push to my fork, and submit a PR to Sienci

Does that seem like a sensible way to do things? I don’t think I need or want to edit code inside the container. I’ve never contributed to an open source project before but I do have a couple of small open source projects on my GitHub. I’ve even received a couple of PR’s but never submitted one.

EDIT:
Thinking a bit more and I guess it doesn’t matter whether the build clones my local repo or my fork if I’m working in a separate branch. Sometimes I over complicate things!

Btw love the image - if you want to share your fork I’ll apply some feature branches to my local build :slight_smile:

I’m applying GitHub - siganberg/gsender at feature/allow-negative-thickness-value to mine as well.

Update:

We’ve put together a new official guide that covers how to build gSender locally, along with solutions to the most common build and dependency issues on different platforms (Windows, macOS, Linux, Raspberry Pi, etc.).

You can find it here:
Sienci Resources > gSender > Experiment > Compile gSender

This page includes setup instructions, troubleshooting tips, etc. If your question was about building or compiling gSender, you should find everything you need there.

If you still have any errors after following the instructions, do let us know and we can look into your specific issues a little more

Thanks for your patience and for helping us improve the documentation, we are really looking forward to your contributions to gSender as well!

1 Like

Thanks! :slight_smile:

I did get it compiling on one Windows machine. On another, I couldn’t. I think it’s around the build-essentials tools (npm install --global --production windows-build-tools)

The tooling is telling me it’s no longer needed on Windows. But, the build is failing.

On my working PC, I have VS2022 installed.

So I think some refinement could be used on steps to go from a fresh Windows install, to working compile.

I’m using Python 3.13.x, Node 20.19.5, Win 11.


$ npm install --global --production windows-build-tools
npm warn config production Use `--omit=dev` instead.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142


npm warn deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.



npm error code 1
npm error path C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
npm error Downloading python-2.7.15.amd64.msi
npm error [>                                            ] 0.0% (0 B/s)
npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm error [============================================>] 100.0% (0 B/s)
npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm error [============================================>] 100.0% (0 B/s)
npm error Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\greg\.windows-build-tools\python-2.7.15.amd64.msi.
npm error
npm error
npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm error [>                                            ] 0.0% (0 B/s)
npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm error [============================================>] 100.0% (0 B/s)
npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm error [============================================>] 100.0% (0 B/s)
npm error Downloaded vs_BuildTools.exe. Saved to C:\Users\greg\.windows-build-tools\vs_BuildTools.exe.
npm error
npm error Starting installation...
npm error Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm error     at Function.defineProperty (<anonymous>)
npm error     at Object.removePath (C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm error     at Object.install (C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm error     at C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm error     at Object.download (C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm error     at async Object.aquireInstallers (C:\Users\greg\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm error   code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm error }
npm error windows-build-tools will now exit.
npm error A complete log of this run can be found in: C:\Users\greg\AppData\Local\npm-cache\_logs\2025-10-31T14_25_33_654Z-debug-0.log

choco install python visualstudio2022-workload-vctools -y was the trick. Perhaps replace the npm step with this.

To finish it off, I had to run the Visual Studio installer in programs with ā€œModifyā€, and then install the Windows 11 SDK options which choco didn’t seem to install.

1 Like

Good suggestion I will give it another test and see if I can get the same great results, then update the documentation accordingly

1 Like

Awesome! Have seen some of the work you’ve been doing on grblhal builder stuff in the background, next few months will be exciting for sure!

1 Like