Skip to content

Commit af437a1

Browse files
author
Dev
committed
chore: update the README for arm64-based image build fix
1 parent 0a3750d commit af437a1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,34 @@ So in this case when a connection event is triggered, it will be sent to: http:/
182182
The payload of the webhook contains the serialized record related to the topic of the event. For the `connections` topic this will be a `ConnectionRecord`, for the `credentials` topic it will be a `CredentialRecord`, and so on.
183183

184184
For the WebSocket clients, the events are sent as JSON stringified objects
185+
186+
## Fix node-gyp build error
187+
While the deployment and image build process might differ, one might encounter error related to a native module compilation, especially on `ARM64`-based linux distributions.
188+
189+
This especially occurs when `node-gyp` is trying to compile `@2060.io/ref-napi`, and the linux distro does not have a build toolchain installed.
190+
191+
### To fix this;
192+
Run the following commands as exactly in the sequence shown below:
193+
```
194+
# 1) Toolchain & headers for node-gyp and common native modules
195+
sudo dnf update -y
196+
sudo dnf groupinstall -y "Development Tools"
197+
sudo dnf install -y gcc-c++ make python3-devel libstdc++-devel \
198+
openssl-devel pkgconf-pkg-config libffi-devel
199+
200+
# 2) Rust toolchain — needed by (some) Hyperledger shared libs. This is RECOMMENDED.
201+
curl https://sh.rustup.rs -sSf | sh -s -- -y
202+
source "$HOME/.cargo/env"
203+
204+
# 3) Ensure that NodeJS is active
205+
nvm use 18.19.0
206+
207+
# 4) Clean previous failed builds
208+
cd to repo root
209+
yarn cache clean
210+
211+
# 5) Reinstall and force native rebuilds
212+
# Yarn classic
213+
YARN_ENABLE_IMMUTABLE_INSTALLS=false \
214+
yarn install --check-files
215+
```

0 commit comments

Comments
 (0)