Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update docs with fnm instructions
  • Loading branch information
johnhunter committed Sep 4, 2023
commit e4e08362a44d1be9b4b091bd2da9a91705ff9190
15 changes: 13 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Getting started

Storybook is developed against a specific node version. We recommend using [Volta](https://volta.sh/) as it will automatically install the correct node and yarn version when you first use the repo. If you chose not to use Volta please ensure you you have node version 16 installed (suggestion: v16.5)
Storybook is developed against a specific node version defined in `.nvmrc`. You can use any Node version manager that uses the `.nvmrc` configuration file. We recommend using [fnm](https://fnm.vercel.app/).

## Using fnm as a Node version manager

- Install fnm [as per instructions](https://github.com/Schniz/fnm/tree/master#installation)
- In your shell setup include the `use-on-cd`, `corepack-enabled` and `version-file-strategy recursive` in the env command, e.g.

```sh
eval "$(fnm env --use-on-cd --corepack-enabled --version-file-strategy recursive)"
```

- Ensure if you are using Windows to use the Windows Subsystem for Linux (WSL).
- Run `yarn start` in the root directory to run a basic test Storybook "sandbox".

## Running the local development environment

The `yarn start` script will generate a React Vite TypeScript sandbox with a set of test stories inside it, as well as taking all steps required to get it running (building the various packages we need etc). There is no need to run `yarn` or `yarn install` as `yarn start` will do this for you.

## Issues
### Issues

If you run `yarn start` and encounter the following error, try rerunning `yarn start` a second time:

Expand Down