Skip to content

docs: add note about npm logging #4032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Changes from all commits
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
13 changes: 13 additions & 0 deletions docs/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -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/<version>/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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Unfortunately, `yarn` swallows all logs on `yarn global add` so instead you can install with `npm` and see the logs:
`yarn` suppresses logs when running `yarn global add`, so to debug installation issues, install with `npm` instead:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh noo! I didn't get a chance to add this because I hit "enable auto-merge" - I'll follow up with a PR


```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
```