Skip to content

Commit

Permalink
Add troubleshooting documentation for Node 16 updates on M1 machines
Browse files Browse the repository at this point in the history
If a user has installed govuk-frontend locally on an M1 machine using Node 14 or lower, `node-sass` will cause errors when running `npm install` or `npm start`.

This can be solved by following the steps in this commit.

This will only affect devs or contributors on Apple silicon who are updating from an older install.
  • Loading branch information
domoscargin committed Apr 25, 2022
1 parent f119c8f commit 56dbbf0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/contributing/running-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ We use [npm](https://docs.npmjs.com/getting-started/what-is-npm) to manage the d
npm install
```

### Fixing Node 16+ errors
If you've previously installed `govuk-frontend` locally using Node v14 or earlier, you may see `node-sass`-related errors when updating to Node v16.

To get rid of these errors, delete the `node_modules` folder, then run:

```
nvm use
npm uninstall node-sass -g && npm cache clean -force && npm install node-sass
npm install
```

## 5. Start a local server
This will build sources, serve pages and watch for changes.
```
Expand Down

0 comments on commit 56dbbf0

Please sign in to comment.