Error compiling duniter

I’m trying to install a duniter node on our PI server running Ubuntu Server and I got this eror:

neon ERR! spawn cargo ENOENT
Error: spawn cargo ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm ERR! errno 1
npm ERR! duniter@1.8.1 install: ./neon/
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the duniter@1.8.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

nvm 0.33.4

connors@connors-desktop:~/duniter-dev$ npm version
  duniter: '1.8.1',
  npm: '6.14.11',
  ares: '1.16.1',
  brotli: '1.0.9',
  cldr: '37.0',
  icu: '67.1',
  llhttp: '2.1.3',
  modules: '83',
  napi: '7',
  nghttp2: '1.41.0',
  node: '14.16.0',
  openssl: '1.1.1j',
  tz: '2020a',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '8.4.371.19-node.18',
  zlib: '1.2.11'

Neon version

connors@connors-desktop:~/duniter-dev$ neon version

Any suggestions?


The latest Duniter release can be run directly, no need for building anything.

If you want to build the dev version, you need a Rust environment and nvm (it works with 10.22.1, I don’t know if it works with later versions). Then the command is:

cargo xtask build --production



Do not run this script yourself. If you want to compile duniter yourself you have to follow step by step the instructions given in the documentation here :

Check carefully that you have installed all the necessary pre-requisites and don’t skip any step, even if it seems useless, all steps are absolutely necessary.

If you just want to deploy a duniter node on raspberry pi, a debian package for arm architecture is already available on the releases page:

Thanks, I didn’t know the exact version used for node

The compiled version (deb, both desktop and server) returns

connors@connors-desktop:~$ duniter start
/usr/bin/duniter: line 36: /opt/duniter//node/bin/node: cannot execute binary file: Exec format error
/opt/duniter//node/bin/node v10 is required

anyway I would rather solve the node.js error than the package one :wink:

About I just copy/pasted an extract of the install log, I didn’t run it manually :wink:

About requisites, I’m on it now that I know the exact node version.

Install deb package is my second best, since there’s no repo

You can try these commands to solve the node v10 required:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/"
nvm install 10.22.1

They are effective only in the current shell, so you have either to place them in ~/.bashrc or ~/.profile, or to run them manually before starting Duniter. (if node v10.22.1 is already installed, it will not reinstall it, but without this command I cannot run or build Duniter)

Unless you want to contribute to the Duniter development or to use GVA (the new HTTP API yet unstable and unreleased), it will be simpler to install the .deb.

The desktop version is compiled for x86_64 architecture, so it can’t work on raspberry pi.
I think you’re just not using the right package, you need to use the package corresponding to the architecture and OS of your machine.

What is the model of your pi ? What OS is installed ? If it’s raspbian, which version (stretch or buster) ?

@tuxmain no it won’t solve anything. The correct version of nodejs is already embedded in the debian package, this error message is wrong and hides another problem, for example an incorrect node binary due to a different architecture.

Concerning the manual compilation, there is a point I didn’t specify. The pointed doc corresponds to the development version. If you want to compile the latest stable version, you have to refer to the documentation on the stable branch:

No, if the version of nodejs is not indicated it means that you don’t need to know it because the installation script installs the right version of nodejs for you, this is only true for the development version.

If you read the doc corresponding to the stable version, you will see that the version of nodejs to be installed is indicated.

Thanks, guys. SOlved following this guide as suggested by elois:

I suggest to edit the guide on the wiki, it is misleading:

2 « J'aime »