|
54 | 54 | - [Docker For Development Environment](#docker-for-development-environment)
|
55 | 55 | - [Problems](#problems)
|
56 | 56 | - [macOS Troubleshooting](#macos-troubleshooting)
|
| 57 | +- [WSL Troubleshooting](#wsl-troubleshooting) |
57 | 58 | - [Maintainers](#maintainers)
|
58 | 59 | - [License](#license)
|
59 | 60 | - [Copyright notice](#copyright-notice)
|
@@ -980,6 +981,40 @@ Here's what you will need to do:
|
980 | 981 |
|
981 | 982 | Now you should be able to use node as usual.
|
982 | 983 |
|
| 984 | +## WSL Troubleshooting |
| 985 | +
|
| 986 | +If you've encountered this error on WSL-2: |
| 987 | +
|
| 988 | + ```sh |
| 989 | + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash |
| 990 | + % Total % Received % Xferd Average Speed Time Time Time Current |
| 991 | + Dload Upload Total Spent Left Speed |
| 992 | + 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com |
| 993 | + ``` |
| 994 | +
|
| 995 | +It may be due to your antivirus, VPN, or other reasons. |
| 996 | +
|
| 997 | +Where you can `ping 8.8.8.8` while you can't `ping google.com` |
| 998 | +
|
| 999 | +
|
| 1000 | +This could simply be solved by running this in your root directory: |
| 1001 | +
|
| 1002 | + ```sh |
| 1003 | + sudo rm /etc/resolv.conf |
| 1004 | + sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' |
| 1005 | + sudo bash -c 'echo "[network]" > /etc/wsl.conf' |
| 1006 | + sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf' |
| 1007 | + sudo chattr +i /etc/resolv.conf |
| 1008 | + ``` |
| 1009 | +
|
| 1010 | +This deletes your `resolve.conf` file thats automatically generated when u run WSL, creates a new file and puts `nameserver 8.8.8.8`, then creates a `wsl.conf` file and adds `[network]` and `generateResolveConf = false` to prevent auto generation of that file. |
| 1011 | +
|
| 1012 | +You can check the contents of the file by running: |
| 1013 | +
|
| 1014 | + ```sh |
| 1015 | + cat /etc/resolv.conf |
| 1016 | + ``` |
| 1017 | +
|
983 | 1018 | ## Maintainers
|
984 | 1019 |
|
985 | 1020 | Currently, the sole maintainer is [@ljharb](https://github.com/ljharb) - more maintainers are quite welcome, and we hope to add folks to the team over time. [Governance](./GOVERNANCE.md) will be re-evaluated as the project evolves.
|
|
0 commit comments