Issue 1:
The problem

I have cloned Microsoft's VSCode Language server. I then change directory to the example I'm interested in (lsp-samples) and run npm install in that folder.

It quickly dies the the following error message:

npm ERR! code EEXIST

npm ERR! syscall mkdir

npm ERR! path G:\My Drive\Git\vscode-extension-samples\vscode-extension-samples\lsp-sample\node_modules.staging

npm ERR! errno -4075

npm ERR! EEXIST: file already exists, mkdir 'G:\My Drive\Git\vscode-extension-samples\vscode-extension-samples\lsp-sample\node_modules.staging'

npm ERR! File exists: G:\My Drive\Git\vscode-extension-samples\vscode-extension-samples\lsp-sample\node_modules.staging

npm ERR! Remove the existing file and try again, or run npm

npm ERR! with --force to overwrite files recklessly.

See attached log file.

2020-01-09T17_39_35_413Z-debug.log

What's weird

is that it complains that the .staging directory already exists, when it is the install process itself that created the folder (when I start, there is no preexisting node_modules folder).

Any idea what the problem might be ? I've tried reinstalling npm, deleting the node_modules folder and starting over, deleting the intermediate .staging folder, using the --force option, to no avail...

Issue 2:
What / Why

npm command is removed after running npm install -g npm.

When

2019/12/18

I can't remember exactly when I succeeded in running this command but at least a week ago.

Where

npm/cli

How

Current Behavior

This is the log:

~
% brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-13.3.0_1.catalina.bottle.tar.gz
Already downloaded: /Users/manabu/Library/Caches/Homebrew/downloads/8a482358c0487b3ffeeebf4d1f3b3ca825018f6318ecdd6368fd0a6f45e0bea1--node-13.3.0_1.catalina.bottle.tar.gz
==> Pouring node-13.3.0_1.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node/13.3.0_1: 4,663 files, 59MB

~
% npm install -g npm
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../../../lib/node_modules/npm/man/man1/npm-access.1
npm ERR! dest /usr/local/share/man/man1/npm-access.1
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man1/npm-access.1' -> '/usr/local/share/man/man1/npm-access.1'
npm ERR! File exists: /usr/local/share/man/man1/npm-access.1
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/manabu/.npm/_logs/2019-12-18T07_51_00_280Z-debug.log

I confirmed that this happened again when I ran brew reinstall node.

Actually as the output said, I successfully ran it with --force but I think that just showing these logs is better than removing the npm command.

Edit (2020/01/11):

Actually as the output said, I successfully ran it with --force

More specifically, I did these steps:

Restore npm command that was removed by npm install -g npm

Since I use Homebrew for managing Node.js, I ran brew reinstall node to restore it

Run npm install -g --force npm as the output mentioned

Steps to Reproduce

n/a

Expected Behavior

Updating npm is successful

Who

n/a

References

n/a