mike-north / full-stack-ts Goto Github PK
View Code? Open in Web Editor NEWMike North's full-stack TypeScript Course
Mike North's full-stack TypeScript Course
Hi, in class we had a little trouble with Windows systems so I figured I'd make a recommendation as to how to install WSL on Windows and connect it to VSCode if anyone struggles with getting the environment set up.
WSL is a subsystem that lets you run a GNU/Linux environment on Windows. Certain node apps can react strangely when crossing platforms and it's a pain to have to adapt them, so having this setup beforehand can help with a lot of those issues.
I was introduced to this in my bootcamp, which tried its best to accommodate windows developers but often struggled with shifting standards, versions and dependencies. It was kind of buggy back then, but today it seems more stable and has lots of fun features.
EDIT - I forgot! Before doing any of this, you might have to enable virtualization on your BIOS. That is particular to whatever PC you might have. Windows may prompt you if it isn't on and you try to install wsl. You may be out of luck if this isn't a feature on your system.
1 - Open an admin-level command window or Powershell and run wsl --install
for the default Ubuntu distribution. If you accidentally load WSL without a distro (I somehow managed to do this), you can find the latest version of Ubuntu for WSL here.
2 - It may take a minute to load the first time. When you open it, it appears as a command window. Linux will ask you to create a username and password.
3 - Once this is set up, you should be able run sudo apt update
followed by sudo apt upgrade
to make sure all your dependencies are up to date, using your password when prompted.
4 - While in WSL, not cmd or powershell, Install Node, npm and yarn in one go by running each of the following lines:
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
yarn should install node for you. You should also check that the version meets the minimum in the project using yarn --version
and update packages if necessary.
5 - Now open VSCode. It may detect that you've installed WSL and recommend you install some extensions to help it run better. Install Remote - WSL
& Remote Development
.
6 - Hit shift+ctrl+p
and select Remote-WSL: New WSL Window
. It will open a new window that will allow you to work directly in your distro.
6 - If you like using the terminal in VSCode, you can now open a WSL terminal. In a fresh window, it starts you on a path that is equivalent to your c:/.../Users/[yourUsername] path. cd
or mkdir
into whatever development folder you want to use.* Otherwise, you can open an Ubuntu terminal by searching for Ubuntu (I'd also pin it to my taskbar for now).
*To avoid potential nasty interactions with Windows on your existing apps, build on your distro's /home/user/etc... and not on /mnt/c/etc... in WSL 2, npm will slow down and crash horribly on a lot of processes. See https://docs.microsoft.com/en-us/windows/wsl/filesystems for more
If you follow the rest of the directions for setup as described in the course, starting from installing Volta, you should be able to work from here.
src - https://docs.microsoft.com/en-us/windows/wsl/install, https://code.visualstudio.com/docs/remote/wsl-tutorial
Mike mentioned a couple of times about the no-unsupported-features/node-builtins
warning with spread. This rule should read the engines.node
property of the package.json
.
While the original value ^14.19.1 || >= ^16.0 || >= ^17.0.0"
should meet the eslint requirements I looks like it might have trouble parsing this complex value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.