From d2d01c151b15e20453b0113d292954876fff06a0 Mon Sep 17 00:00:00 2001 From: "shigeru.nakajima" Date: Mon, 30 Nov 2026 20:56:34 +0900 Subject: [PATCH 1/2] Update npm installation permission guidance --- TROUBLESHOOTING.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 4b9d3500..24259454 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -1,16 +1,14 @@ # 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. 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/). -- On unix shells, prefix the command with sudo -> `sudo npm install --global javascripting` +After completing the setup, retry the installation from your regular terminal: -- On Windows and if using either PowerShell or CMD, ensure you open the shell with administrator privilege. - -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 +```sh +npm install -g javascripting +``` ### `EEXIST` error From 0b563f3c1ffa12c8cd092e7dcced09d9fd3fd709 Mon Sep 17 00:00:00 2001 From: "shigeru.nakajima" Date: Mon, 30 Nov 2026 21:09:57 +0900 Subject: [PATCH 2/2] Show how to run the workshop with npx after EACCES --- TROUBLESHOOTING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 24259454..bdc042e2 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -2,7 +2,15 @@ ### `EACCES` during installation -If `npm install -g javascripting` fails with `EACCES`, your account may lack write access to npm’s global installation directory. 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/). +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: + +```sh +npx javascripting +``` + +When an exercise asks you to run a workshop command, prefix it with `npx`, for example `npx javascripting verify introduction.js`. + +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: