denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.09k stars 5.36k forks source link

Error during Deno 2.0 installation on WSL: .deno/enveval: No such file or directory #26481

Open DiegoT4l opened 1 week ago

DiegoT4l commented 1 week ago

Version: Deno 2.x.x

When installing Deno 2.0 in a WSL (Windows Subsystem for Linux) environment, the following error appears in the terminal upon opening a new Bash session:

-bash: /home/diegot4l/.deno/enveval: No such file or directory

After investigating, I found a problematic line in the ~/.bashrc file that was automatically added during the Deno installation:

. "/home/diegot4l/.deno/env"eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

The issue is that the line is malformed. It should be separated into two distinct commands:

. "/home/diegot4l/.deno/env"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Steps to reproduce the issue:

  1. Install Deno 2.0 on a WSL environment using the official installation script (curl -fsSL https://deno.land/install.sh | sh)
  2. Open a new terminal session in WSL.
  3. The aforementioned error appears in the terminal.

Expected behavior:

The installation should correctly configure the ~/.bashrc file without errors, allowing the use of Deno without additional issues.

Development environment:

Possible solution:

Update the installation script to ensure the commands are correctly written to the ~/.bashrc file, avoiding the error.

DiegoT4l commented 1 week ago

image