ipfs / npm-kubo

Install Kubo (go-ipfs) from NPM
https://www.npmjs.com/package/kubo
MIT License
41 stars 30 forks source link

Error: No binary available for arch 'undefined' on Raspberry Pi 4 #46

Closed christroutner closed 2 years ago

christroutner commented 2 years ago

Running npm install go-ipfs fails on a Raspberry Pi 4 processor (aarch64 or arm64 architecture).

Here is the output from npm:

npm ERR! code 1
npm ERR! path /media/trout/code/ipfs-bch-wallet-consumer/node_modules/go-ipfs
npm ERR! command failed
npm ERR! command sh -c node src/post-install.js
npm ERR! https://dist.ipfs.io/go-ipfs/versions
npm ERR! Error: No binary available for arch 'undefined'
npm ERR!     at getDownloadURL (/media/trout/code/ipfs-bch-wallet-consumer/node_modules/go-ipfs/src/download.js:162:11)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:95:5)
npm ERR!     at async download (/media/trout/code/ipfs-bch-wallet-consumer/node_modules/go-ipfs/src/download.js:178:15)
npm ERR!     at async module.exports (/media/trout/code/ipfs-bch-wallet-consumer/node_modules/go-ipfs/src/download.js:251:13)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/trout/.npm/_logs/2022-01-21T03_59_07_742Z-debug-0.log
christroutner commented 2 years ago

I was able to overcome this issue by setting the following environment variable in Ubuntu:

ukstv commented 2 years ago

@achingbrain Mind releasing version 0.11 with new changes that allow arch architecture on Apple Silicon and RPi, please? Maybe as 0.11.0-1?

achingbrain commented 2 years ago

go-ipfs 0.12.0 shipped which meant this module got an automated release too and it should have the fix for M1 & RPis - could you please try with the latest version?

ukstv commented 2 years ago

@achingbrain I confirm, it works on M1.

christroutner commented 2 years ago

I can confirm that npm install go-ipfs now installs on a Raspberry Pi 4, using node v14.19.0 and npm v8.5.1