Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ SHELL ["bash", "-c"]
RUN mkdir -p config
COPY dfx.json dfx.json
COPY config.json config.json
ENV NODE_VERSION=18.20.5
Comment thread
yhabib marked this conversation as resolved.
RUN jq -r .dfx dfx.json > config/dfx_version
RUN jq -r '.defaults.build.config.NODE_VERSION' config.json > config/node_version
RUN jq -r '.defaults.build.config.DIDC_RELEASE' config.json > config/didc_version
Expand Down
1 change: 0 additions & 1 deletion frontend/.nvmrc

This file was deleted.

9 changes: 9 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ All the Internet computer interactions are done through ic-js or the official [a

## Installation and local development

Set the node version defined in [config.json](https://github.com/dfinity/nns-dapp/blob/main/config.json#L103).

If you use [nvm](https://github.com/nvm-sh/nvm), you can run the following commands to set up the correct Node.js version:

```bash
npm run sync-node-version # Creates .nvmrc with the required version
nvm use # Switches to the specified version
```

Clone the project on your computer and install the libraries:

```bash
Expand Down
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"update:agent": "npm rm @dfinity/agent @dfinity/auth-client @dfinity/candid @dfinity/identity @dfinity/principal @dfinity/nns @dfinity/cmc @dfinity/sns @dfinity/utils @dfinity/ledger-icrc @dfinity/ledger-icp @dfinity/ckbtc @dfinity/ic-management && npm i @dfinity/agent @dfinity/auth-client @dfinity/candid @dfinity/identity @dfinity/principal @dfinity/utils@next @dfinity/ledger-icrc@next @dfinity/ledger-icp@next @dfinity/nns@next @dfinity/cmc@next @dfinity/sns@next @dfinity/ckbtc@next @dfinity/ic-management@next && ../scripts/revert-next.sh",
"update:gix": "npm update @dfinity/gix-components",
"upgrade:next": "npm rm @dfinity/nns @dfinity/cmc @dfinity/sns @dfinity/utils @dfinity/ledger-icrc @dfinity/ledger-icp @dfinity/ckbtc @dfinity/ic-management && npm i @dfinity/nns@next @dfinity/cmc@next @dfinity/sns@next @dfinity/utils@next @dfinity/ledger-icrc@next @dfinity/ledger-icp@next @dfinity/ckbtc@next @dfinity/ic-management@next && ../scripts/revert-next.sh",
"start:snapshot": "../scripts/dfx-snapshot-start --snapshot ~/snapshot.tar.xz "
"start:snapshot": "../scripts/dfx-snapshot-start --snapshot ~/snapshot.tar.xz ",
"sync-node-version": "./scripts/sync-node-version"
},
"engines": {
"npm": ">=9.0.0 <11.0.0",
Expand Down
6 changes: 6 additions & 0 deletions frontend/scripts/sync-node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/../.."

NODE_VERSION=$(jq -r '.defaults.build.config.NODE_VERSION' "$ROOT_DIR"/config.json)
echo "v$NODE_VERSION" >"$ROOT_DIR"/frontend/.nvmrc