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! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firstname.lastname@example.org install:
npm ERR! Exit status 1
npm ERR! Failed at the email@example.com install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
connors@connors-desktop:~/duniter-dev$ npm version
connors@connors-desktop:~/duniter-dev$ neon version
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
About build.sh: I just copy/pasted an extract of the install log, I didn’t run it manually
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:
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 10.22.1
They are effective only in the current shell, so you have either to place them in
~/.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
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.