Development process

How to run Nuclear in development mode and start coding

Prerequisites

Ensure that you have installed the prerequisites:

Quickstart

Start by cloning the repository:

$ git clone [email protected]:nukeop/nuclear.git

Go to the project root and install the dependencies:

$ cd nuclear
$ npm install

This will install the dependencies in the project root, and automatically link the local packages with lerna. Nuclear is using a monorepo structure, which means it's a collection of Node packages, as you can see in the packages folder.

Next, you can run the tests:

$ npm test

Nuclear has CI pipelines, which means that we use Github Actions to verify that tests pass and the project can be built after every commit. You can see the status of these pipelines here: https://github.com/nukeop/nuclear/commits/master

Next to each commit, there is a checkmark or a red X. If there's a checkmark, and something doesn't work for you, it's likely that it's a problem on your machine.

Or start the program in development mode:

$ npm start

To build a production release, run this:

$ GITHASH=<version> npm run build:<platform>

Replace <version> with a string that will be added to the filenames of the built packages, e.g. 0.6.30 or a short githash: f4b6771. This only affects the filenames, but needs to be set.

Replace <platform> with the name of your platform: linux, macos, windows or all.

The binaries will be created in <root>/release.

Troubleshooting

Errors

Here are some commonly seen errors when running the tests, the build, or the player itself. If you see anything else, let us know on Github: https://github.com/nukeop/nuclear/issues, or on Discord: https://discord.gg/JqPjKxE

ModuleNotFoundError: No module named 'distutils'

You have to install Python's setuptools, needed for node-gyp. You can do that by running:

$ pip install setuptools

npm ERR! Error: could not find the cargo executable.

This means you need to install Rust. See here how to do that: https://www.rust-lang.org/tools/install

Last updated

Was this helpful?