How to set-up for compiling js-ipfs

I installed the following to set up my work environment for Ubuntu:
-Vagrant
-Virtualbox
-Aegir
-npm and git to clone and install GitHub - ipfs/js-ipfs: IPFS implementation in JavaScript (following the instructions from the browse-mfs example)

I managed to get it to work 1 time, but now on a different machine I stumble upon a problem. npm install works fine bus the npm run build gives an error message (aegir not found). I see the /js-ipfs/packages/ipfs-core-utils/package.json file starts the build process and it says in line 25 ā€œaegir buildā€ that is where the error originates.
My question is; why can it not find and build the .aegir.js script.

Any questions or answers are welcome :slight_smile:

lerna info Executing command in 10 packages: ā€œnpm run buildā€
ipfs-message-port-protocol: > ipfs-message-port-protocol@0.2.0 build /home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs/packages/ipfs-message-port-protocol
ipfs-message-port-protocol: > aegir build
ipfs-message-port-protocol: sh: 1: aegir: not found

The steps are:

$ git clone https://github.com/ipfs/js-ipfs.git
$ cd js-ipfs
$ npm install
$ npm test

If you have problems with the npm test step, the install may have failed in which case there should be an error message at the end of the console output.

If you can paste the last 50 lines or so of the install output itā€™ll help tell whatā€™s wrong.

Thank you for your time :slight_smile: this is what I got:

root@MrFronz:/home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs# npm test

js-ipfs@1.0.0 test /home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs
lerna run test

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 11 packages: ā€œnpm run testā€
interface-ipfs-core: > interface-ipfs-core@0.140.0 test /home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs/packages/interface-ipfs-core
interface-ipfs-core: > echo ā€˜No tests hereā€™
interface-ipfs-core: No tests here
ipfs-core-utils: > ipfs-core-utils@0.4.0 test /home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs/packages/ipfs-core-utils
ipfs-core-utils: > aegir test
ipfs-core-utils: sh: 1: aegir: not found
ipfs-core-utils: npm ERR! code ELIFECYCLE
ipfs-core-utils: npm ERR! syscall spawn
ipfs-core-utils: npm ERR! file sh
ipfs-core-utils: npm ERR! errno ENOENT
ipfs-core-utils: npm ERR! ipfs-core-utils@0.4.0 test: aegir test
ipfs-core-utils: npm ERR! spawn ENOENT
ipfs-core-utils: npm ERR!
ipfs-core-utils: npm ERR! Failed at the ipfs-core-utils@0.4.0 test script.
ipfs-core-utils: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
ipfs-core-utils: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
ipfs-core-utils: npm ERR! A complete log of this run can be found in:
ipfs-core-utils: npm ERR! /root/.npm/_logs/2020-10-27T23_27_21_657Z-debug.log
lerna ERR! npm run test exited 1 in ā€˜ipfs-core-utilsā€™
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! Test failed. See above for more details.

Ah, no - I meant the end of the output from the npm install command.

This is what I got with npm install:

poopy@MrFronz:~/Desktop/ex2/aegir-dev-vm/js-ipfs$ sudo -s
[sudo] password for poopy:
root@MrFronz:/home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs# npm install
npm WARN lifecycle js-ipfs@1.0.0~postinstall: cannot run in wd js-ipfs@1.0.0 lerna bootstrap (wd=/home/poopy/Desktop/ex2/aegir-dev-vm/js-ipfs)
audited 755 packages in 8.362s

27 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Thereā€™s no need to use sudo to install, just do it as your regular user.