diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 4b9d3500..bdc042e2 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -1,16 +1,22 @@ # Troubleshooting -### `EACCESS` error +### `EACCES` during installation -If you get an `EACCESS` error, the simplest way to fix this is to rerun the command, in either of the following ways: +If `npm install -g javascripting` fails with `EACCES`, your account may lack write access to npm’s global installation directory. You can start the workshop directly: -- On unix shells, prefix the command with sudo -> `sudo npm install --global javascripting` +```sh +npx javascripting +``` -- On Windows and if using either PowerShell or CMD, ensure you open the shell with administrator privilege. +When an exercise asks you to run a workshop command, prefix it with `npx`, for example `npx javascripting verify introduction.js`. -You can also fix the permissions so that you don't have to use `sudo`. Take a look at this npm documentation: -https://docs.npmjs.com/getting-started/fixing-npm-permissions +If you prefer a global installation, npm recommends installing Node.js and npm with a Node version manager. On macOS and Linux, you can also configure npm to install global packages in your home directory. Follow [npm’s guide to resolving global installation permissions](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally/). + +After completing the setup, retry the installation from your regular terminal: + +```sh +npm install -g javascripting +``` ### `EEXIST` error