Multiple Errors when Running Bun via WSL - bun

I am trying to install some packages using Bun, but I am running into trouble:
$ bun install
error: Failed to initialize network thread: SystemOutdated.
HTTP requests will not work. Please file an issue and run strace().
Is there any known fix to this problem?

Bun leverages some network features which are only available on newer versions of WSL. You can usually fix these issues by updating your WSL version:
wsl --update
And restart your WSL VM:
wsl --shutdown
Also note that Bun only supports WSL2, so you would need to upgrade your WSL version to 2. See the Microsoft guide on updating from WSL1 to WSL2.
Furthermore, if you are getting an error for NotSameFileSystem, then you need to defer to using a different style for installations. This can be done by adding the --backend=copyfile to the end of your commands.

Related

How to install specific version in ARCH using yay?

I have issue with latest version of vscode==1.75.1.
I'm ussing Microsoft Dev Containers extension, and inside dev container I cannot run termminal .
Error is: The connection to the terminal's pty host process is unresponsive, the terminals may stop working.
I'm traying to find any olution for this problem.
I done uninstall, remove all filles related to vscode, install agan with yay -S visual-studio-code-bin and still have issue.
I want to install specific version of visual-studio-code-bin==1.74.3, how to install with yay -S?
p.s. This was after I updated system.
Thanks!

Jupyter Notebook Error: "Jupyter command `jupyter-notebook` not found."

I just downloaded vscode using homebrew and install python#3.11 using homebrew as well. I used pip3 install jupyter as I saw other recommend to fix this issue and still no luck. I have downloaded all the extensions on vscode and I have set the kernal to homebrew version of python and I still recieve this issue. Note that I have used notebooks in the past and have never gotten this issue so I am not really sure what it is this time. I have not installed anaconda.
I have tried uninstalling and installing the extensions but no luck. I have tried to pip3 uninstall jupyter, pip3 uninstall notebook and reinstall them and still no luck. I have tried to change the kernal to the default python3 on the mac and still nothing. My mac is m1 running on Ventura 13.2. I am able to run python code on regular python files just not using jupyter notebook. I followed the instructions how to set it up on vscode website but I got this error. Any help would be appreciated thank you.
I have same issue using VSCode on Mac OS.
VSCode's 'Jupyter' plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.
I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Form your VSCode Command Palette (Shift+Command+P), search and then choose
Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).

WSL2 VSCode Will Not Load After Ubuntu upgrade - Worked fine for 1 year

Running Windows 11, WSL2, Ubuntu 20.04. Been developing with VSCode over a year. I regularly run apt update and apt upgrade without any problem. Today after running apt upgrade I can no longer open VSCode. I get the following error
node:internal/modules/cjs/loader:990
throw err;
^
Error: Cannot find module '\wsl.localhost\Ubuntu-20.04\mnt\c\Users\JimD\AppData\Local\Programs\Microsoft VS Code\Code.exe'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
at Module._load (node:internal/modules/cjs/loader:832:27)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
That is the correct path to the VSCode exe, but I am not sure about the \wsl.localhost\Ubuntu-20.04 part
I rolled back my wsl to an month old backup and confirmed VSCode ran fine. Ran apt update and upgrade on that and get the same error.
Does anyone know how to fix this?
Starting from a functioning backup of the WSL image, I manually installed each packaged listed from apt list --upgradable. Turns out it is the upgrade from systemd-genie 2.3 to 2.4 that is causing the problem.
If I upgrade every other package, VSCode still loads. When I upgrade systemd-genie to 2.4 and restart my laptop, VSCode will not load giving the error in the original post.
edit /usr/lib/binfmt.d/WSLInterop.conf, change flag PF to F, reboot wsl seems able to let you run code again, but not sure whether any other side-effects exists.
My final solution was to just not use systemd. With the release of Windows 11, a new feature has been added to WSL to runs scripts on WSL startup. This feature is now also available to Windows 10 users if you install WSL from the Microsoft Store (requires KB5020030, which should be available under Optional Updates).
create the file /etc/wsl.conf and the following
[boot]
command = bash /etc/[path to startup script]
in my case I used the path "/etc/wsl-services-start.sh" This shell script contains only
service apache2 start
service mysql start
Starting apache2 and mysql was the only thing I needed systemd for, so this works fine for me.

Strange vscode issue in WSL

I've been trying to set up the vscode code . shortcut to work in WSL. Following the instructions from the vscode website, I reinstalled vscode in windows, reinstalled the Remote-Wsl extension, made sure it was in my System Path, and tried running code . in the WSL linux distro terminal. I get the message instructing me to install it on the windows side, and asking me if I want to continue. I hit yes, but it doesn't create the code server folder in my home directory. Typing code . again does the same thing.
Does anyone know why this may be?
This is the output text:
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the code command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N]
The error message isn't just pointing out that you need to install the Windows version, but it indicates that you have the Linux version installed in WSL and should remove it.
From that, it sounds like at some point you may have installed the Linux version of VSCode in WSL, and that one is taking priority. You'll need to uninstall it in order to run the Windows version of VSCode with the "Remote - WSL" extension.
You don't mention what distribution you are running, but if it is Ubuntu, try:
sudo apt remove code # or
sudo apt remove code-insiders
Also see the uninstall doc from Microsoft.

Opening WSL remote window not working - command wslpath not found

When trying to open a new Remote-WSL window I run into an error during the "Installing VS Code Server in WSL (details): Installing WSL components" step. Appears it can not find the wslpath command.
I have tried looking at my PATH variables, I didn't see wslpath anywhere there nor do I know what the path should look like? I also tried reinstalling my linux distribution but that did not help.
[2019-07-09 12:23:39.266] Launching C:\Windows\System32\wsl.exe bash -c "'$(wslpath -u 'c:/Users/laida/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.8/scripts/wslServer.sh')' '0f3794b38477eea13fb47fbe15a42798e6129338' 'stable' '.vscode-server' 'C:/Users/laida/AppData/Local/Temp/vscode-remote-wsl/0f3794b38477eea13fb47fbe15a42798e6129338/vscode-server-linux-x64.tar.gz' 0 " in c:\Users\laida\.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.8
[2019-07-09 12:23:39.562] /bin/bash: wslpath: command not found
[2019-07-09 12:23:39.562] bash: : command not found
[2019-07-09 12:25:10.024] VS Code Server for WSL failed to start. No messages received for 90s
I just ran into this today when starting up Remote - WSL. I am using an older Windows 10 version as #Biswapriyo noted, so I resolved it by installing wslpath from https://github.com/laurent22/wslpath
(Note: I also had to install php for that to work).
After that I was able to start Remote - WSL
I imagine that installing a newer Windows 10 version would probably work as well, but I'm unable to do that (managed image) and even if I were able that's kind of like killing an ant with a sledgehammer.

Categories