Version
Microsoft Windows [Version 10.0.19041.1288]
WSL Version
Kernel Version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1237-Microsoft Sat Sep 11 14:32:00 PST 2021
Distro Version
Ubuntu-20.04
Other Software
No response
Repro Steps
In wsl terminal:
nvm install-latest-npm
Expected Behavior
NPM is installed/updated to latest supported version
Actual Behavior
Command exits out with this output:
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width
npm ERR! dest /home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width' -> '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66'
npm ERR! [OperationalError: EACCES: permission denied, rename '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width' -> '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66'] {
npm ERR! cause: [Error: EACCES: permission denied, rename '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width' -> '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width',
npm ERR! dest: '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/npm-5bc2ba18/node_modules/string-width',
npm ERR! dest: '/home/alexbu92/.nvm/versions/node/v14.18.1/lib/node_modules/.staging/string-width-27ab7c66'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alexbu92/.npm/_logs/2021-10-29T14_04_41_047Z-debug.log
* npm upgraded to: v6.14.15
Update: Don't know if it matters but whereis npm gives me this:
alexbu92@LAPTOP-R8SQE3K7:/mnt/c/Users/alexb$`` whereis npm
npm: /usr/bin/npm /usr/share/npm /home/alexbu92/.nvm/versions/node/v14.18.1/bin/npm /mnt/c/Program Files/nodejs/npm /mnt/c/Program Files/nodejs/npm.cmd /usr/share/man/man1/npm.1.gz
Diagnostic Logs
No response
Version
Microsoft Windows [Version 10.0.19041.1288]
WSL Version
Kernel Version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1237-Microsoft Sat Sep 11 14:32:00 PST 2021
Distro Version
Ubuntu-20.04
Other Software
No response
Repro Steps
In wsl terminal:
nvm install-latest-npmExpected Behavior
NPM is installed/updated to latest supported version
Actual Behavior
Command exits out with this output:
Update: Don't know if it matters but
whereis npmgives me this:alexbu92@LAPTOP-R8SQE3K7:/mnt/c/Users/alexb$`` whereis npm npm: /usr/bin/npm /usr/share/npm /home/alexbu92/.nvm/versions/node/v14.18.1/bin/npm /mnt/c/Program Files/nodejs/npm /mnt/c/Program Files/nodejs/npm.cmd /usr/share/man/man1/npm.1.gzDiagnostic Logs
No response