Windows 10: Permission error on WSL 2 when trying to setup a nodejs project

Discus and support Permission error on WSL 2 when trying to setup a nodejs project in Windows 10 Network and Sharing to solve the problem; TL:DR; Can't use npm global package in /mnt/c/Users.username. It works in WSL home ~ though. --- Currently, I have all my web projects in... Discussion in 'Windows 10 Network and Sharing' started by TiberiuIon, Aug 27, 2020.

  1. Permission error on WSL 2 when trying to setup a nodejs project


    TLPermission error on WSL 2 when trying to setup a nodejs project :DR;

    Can't use npm global package in /mnt/c/Users.username. It works in WSL home ~ though.

    ---

    Currently, I have all my web projects in /mnt/c/Users/[username]/dev.

    Steps I took:


    1. I open the terminal and access the above folder via a symlink.


    2. Installed p5js-cli package globally but when I get to use it I get the below output:

    dev p5 new test+

    Creating new p5.js project in test...

    [Error: failed to mmap. Could not write data: Permission denied] {

    errno: -1,

    errorFunction: 'Clone.clone'

    }

    I'm struggling to get my head around file permissions in this case.

    If I run ls -lah in the windows folder I get the below output which I understand it means I should have the correct access to those folders and the output is consistent with the files on the WSL side.

    drwxrwxrwx 1 username username 4.0K Aug 25 23:31

    ...


    I have installed vue-cli and was able to successfully use it to create a project in /mnt/c/Users/username/dev , could this be an issue with p5js-cli and not the wsl setup?

    :)
     
    TiberiuIon, Aug 27, 2020
    #1

  2. WSL 2

    I want to make use of WSL 2 feature with the new update of Windows version 2004 , in order to use WSL 2 i need to enable Virtualization in my pc bios settings. So when i enable virtualization my windows starts lagging and all the animations of scrolling
    etc etc lags...Please suggest me something to fix that so that i could use the new virtualization feature.
     
    Legend Hunter 3, Aug 27, 2020
    #2
  3. Jerome281 Win User
    Jerome281, Aug 27, 2020
    #3
  4. NickJP Win User

    Permission error on WSL 2 when trying to setup a nodejs project

    Cannot upgrade installed distros in WSL to version 2

    After installing the Win10 2004 build 19041 update (running winver shows "version 2004 (OS build 19041.388)", I've tried to upgrade a couple of installed distros I had in WSL version 1 to WSL version 2 following the instructions at https://docs.microsoft.com/en-us/win.../install-win10. All the steps in the instructions compete successfully, up to the point where I try to change the WSL version of one of the installed distros to 2 at which point I see the messages below:

    Code:
    I have enabled the Virtual Machine Platform feature (it shows as on with a tick against it in Control Panel Windows features), Intel-vt virtualization is enabled in the BIOS, and running msinfo32 shows, at the bottom of the system summary listing:

    Code:
    I also tried installing another distro with the WSL default version set to 2, but attempting to launch it shows the error:

    Code:
    Any suggestions on how to get around this problem? From what I've read, WSL2 gives worthwhile speed increases over WSL1, and so is worth using if I can get it to work.
     
    NickJP, Aug 27, 2020
    #4
Thema:

Permission error on WSL 2 when trying to setup a nodejs project

Loading...
  1. Permission error on WSL 2 when trying to setup a nodejs project - Similar Threads - Permission error WSL

  2. Windows WSL 2 - Ubuntu - IO Errors

    in Windows 10 Gaming
    Windows WSL 2 - Ubuntu - IO Errors: I have the latest Ubuntu installed using WSL 2 on Windows 11. Recently, when the computer goes to lock-screen or just after a couple of hours of idle technically PHP and Node/Npm/VIte servers are running, I get IO errors and can't do anything. Restarting Ubuntu shell doesn't...
  3. WSL 2 Error

    in Windows 10 Gaming
    WSL 2 Error: I Installed WSL 2 recently and started getting the following error , once I open the windows/Ubuntu terminalOperation did not complete successfully because the file contains a virus or potentially unwanted software. Error code: Wsl/Service/CreateInstance/CreateVm/0x800700e1...
  4. WSL 2 Error

    in Windows 10 Software and Apps
    WSL 2 Error: I Installed WSL 2 recently and started getting the following error , once I open the windows/Ubuntu terminalOperation did not complete successfully because the file contains a virus or potentially unwanted software. Error code: Wsl/Service/CreateInstance/CreateVm/0x800700e1...
  5. Upgrade to WSL 2

    in Windows 10 Software and Apps
    Upgrade to WSL 2: I installed WSL using `wsl --install`. It installed WSL 1 not 2. In the meantime I loaded Ubuntu and made several customizations there. Can I upgrade to WSL 2 and preserve this Ubuntu dstribution?...
  6. WSL 2 Ubuntu

    in Windows 10 Customization
    WSL 2 Ubuntu: Hello Sir/Ma'am, I'm using Windows Subsystem for linux version 2 to use Ubuntu and recently I've found out that my Ubuntu terminal is not giving any output when I type "Who" command. Can anybody help me? Thank you....
  7. WSL 2

    in Windows 10 BSOD Crashes and Debugging
    WSL 2: I want to make use of WSL 2 feature with the new update of Windows version 2004 , in order to use WSL 2 i need to enable Virtualization in my pc bios settings. So when i enable virtualization my windows starts lagging and all the animations of scrolling etc etc lags...Please...
  8. Error: 0x1bc when wsl --set-default-version 2

    in Windows 10 Ask Insider
    Error: 0x1bc when wsl --set-default-version 2: I installed Ubuntu 20.04 after reinstalling a fresh install of Windows 10 after formatting. When I run the following command, I notice Ubuntu is using Version 1. PS C:\Windows\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu-20.04 Running 1 When I try to set...
  9. SSH to wsl 2

    in Windows 10 Ask Insider
    SSH to wsl 2: Anyone know how to get ssh to work in windows wsl 2? I've followed some guides, but I'm still getting connection refused when I try to ssh into my windows ip, or it just hangs when I ssh into the wsl ip submitted by /u/MrDroo [link] [comments]...
  10. WSL 1 to WSL 2 Upgrade

    in Windows 10 Support
    WSL 1 to WSL 2 Upgrade: Been using Windows Subsytem for Linux for some time. How do I get it upgrade to WSL 2. 132527