From 5b6db905bbe87dcc909fb41d116226087d35364d Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 24 Aug 2021 15:25:04 -0700 Subject: [PATCH] docs: add note about npm logging --- docs/npm.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/npm.md b/docs/npm.md index 4aaa0c07..42589fa1 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -12,6 +12,7 @@ - [Installing](#installing) - [Troubleshooting](#troubleshooting) - [Issues with Node.js after version upgrades](#issues-with-nodejs-after-version-upgrades) + - [Debugging install issues with npm](#debugging-install-issues-with-npm) @@ -132,3 +133,15 @@ A step-by-step example of how you might do this is: 2. Navigate into the directory: `cd /usr/local/Cellar/code-server//libexec/lib/vscode/` 3. Recompile the native modules: `npm rebuild` 4. Restart code-server + +### Debugging install issues with npm + +Unfortunately, `yarn` swallows all logs on `yarn global add` so instead you can install with `npm` and see the logs: + +```shell +# Uninstall +npm uninstall -g --unsafe-perm code-server > /dev/null 2>&1 + +# Install with logging +npm install --loglevel verbose -g --unsafe-perm code-server +```