Skip to content

Commit

Permalink
updated README to suggest workaround if dev machine doesn't support n…
Browse files Browse the repository at this point in the history
…ode18
  • Loading branch information
mnaamani committed Jul 20, 2023
1 parent 76b9950 commit 38faadf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ functionality to support the [various roles](https://joystream.gitbook.io/testne

## Development

For best results use GNU/Linux with minimum GLIBC_2.28 for nodejs v18+, eg. Ubuntu 22.04 or newer.

The following tools are required for building, testing and contributing to this repo:

- [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_
Expand All @@ -19,19 +21,39 @@ The following tools are required for building, testing and contributing to this

If you use VSCode as your code editor we recommend using the workspace [settings](devops/vscode/settings.json) for recommend eslint plugin to function properly.

After cloning the repo run the following initialization scripts:
After cloning the repo run the following to get started:

### Install development tools
```sh
# Install development tools
./setup.sh
```

### If you prefer your own node version manager
Install development tools without Volta version manager.

```sh
./setup.sh --no-volta
```

### For older operating systems which don't support node 18
Modify the root `package.json` and change volta section to use node version 16.20.1 instead of 18.6.0
```json
"volta": {
"node": "16.20.1",
"yarn": "1.22.19"
}
```

# build local npm packages
### Run local development network

```sh
# Build local npm packages
yarn build:packages

# Build joystream/node docker testing image
RUNTIME_PROFILE=TESTING yarn build:node:docker

# start a local development network
# Start a local development network
RUNTIME_PROFILE=TESTING yarn start
```

Expand Down
14 changes: 8 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ rustup component add rustfmt
# cargo install --force subkey --git https://github.com/paritytech/substrate --version ^2.0.2 --locked

# Volta nodejs, npm, yarn tools manager
curl https://get.volta.sh | bash
if ! [[ $1 == "--no-volta" ]]; then
curl https://get.volta.sh | bash

# source env variables added by Volta
source ~/.bash_profile || source ~/.profile || source ~/.bashrc || :
# source env variables added by Volta
source ~/.bash_profile || source ~/.profile || source ~/.bashrc || :

volta install node@18
volta install yarn
volta install npx
volta install node
volta install yarn
volta install npx
fi

echo "You may need to open a new terminal/shell session to make newly installed tools available."

0 comments on commit 38faadf

Please sign in to comment.