n: No such file or directory (WSL, Ubuntu 19.10)

Bug Report

Summary

Can not install latest node.js via n on Ubuntu 19.10 (WSL)

Steps to Reproduce

sudo n latest

Expected Behaviour

latest node.js version is installed

Actual Behaviour

cp: cannot stat '/usr/local/n/versions/node/13.0.1/lib': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/13.0.1/bin': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/13.0.1/include': No such file or directory
cp: cannot stat '/usr/local/n/versions/node/13.0.1/share': No such file or directory
/usr/bin/n: line 566: /usr/local/bin/node: No such file or directory
   installed : 

Configuration Details

$ n --version
6.1.0

$ command -v node
/usr/bin/node

$ node -p process.platform
linux

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20

Most upvoted comments

So, temporary solution is:

  1. to follow these steps: https://github.com/microsoft/WSL/issues/4461#issuecomment-547491959
  2. to run sudo n rm 13.0.1 && sudo n latest

The bug is in WSL / gzip, not in your package. Thank you for your help!