By following the steps on this page, you can install Dolos directly on your system. You can also use Dolos by using the docker container we have provided.
node --version # v18.10.0
If this reports an error (
node: command not found) or an older version than 14, you will need to install Node using the instructions below.
The Windows documentation mentions two approaches to installing Node.js:
- Download and install Node directly from the Node.js homepage
- Install Node on WSL (Windows Subsystem for Linux).
If you are not sure which method is best, please refer to the Microsoft documentation site.
When installing Dolos on Windows, you need to enable support for building native modules. In the installer on the page Tools for Native Modules you need to check the box to Automatically install the necessary tools.
Alternatively, you can install these tools manually by following the instructions on the node-gyp page.
Debian or Ubuntu Linux
Node provides specific installation instructions for these Linux distributions.
Other Linux distributions
Node is available in the repository of various package managers, please search for Node using the package manager of your distribution.
By default, Node comes with its own package manager
npm. You can install Dolos with
npm using the following command:
npm install -g @dodona/dolos
@dodona/ prefix is required. If you just try installing
dolos you will install another package not associated with this project.
-g flag will install Dolos globally. If you omit this flag,
Alternatively, you can also use other node package managers like yarn:
yarn add global @dodona/dolos
You should now be able to run Dolos. You can test this by running Dolos with the
--version flag, which will print the current Dolos version, the version of Node it is running on and the version of tree-sitter.
Dolos already supports most common programming languages out-of-the box. However, if the language you want to use is not supported, you can easily add a new language.
Module was compiled against a different Node.js version
If you get the following error:
Error: The module 'node_modules/@dodona/dolos/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 67. This version of Node.js requires NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
tree-sitter was installed for another Node version. This can occur when you update Node, or when you use a Node version manager (like nvm) and switched versions.
npm rebuild -g --force. This will recompile all binary addons for your current Node version.
Could not find Python/Visual Studio/CC installation
When installing Dolos, some native modules need to be build using
node-gyp, which requires Python and a compiler (Visual Studio on Windows). For example: if you don't have Python available on your system, you will get the following error when installing Dolos:
npm ERR! gyp ERR! find Python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
A similar warning can be shown for
Afterwards you may need to reinstall dependencies by passing the
npm install -g --force @dodona/dolos
Cannot find module './build/Release/tree_sitter_runtime_binding'
Something went wrong while building the native modules. Try to rebuild the native modules using
npm rebuild -g --force.