Posted in react
711
2:53 am, February 6, 2025
 

Create a React App with Vite and TypeScript on Windows

This assumes that you already have the latest node installed, i had some issues as i had an old version installed and had to manually delete it. 

You can check the version of node by typing node -v in terminal. For some reason i had an ancient version of 11 or something, it must have been installed with something else. 

In Powershell

  • WIN + X
  • Terminal Admin

cd to your code directory, that you want the react and vite site

Im using D:\code\react

d:

cd "d:\code\react"

For some reason i have to use npm.cmd as npm does not work by its self on windows for me..

npm.cmd create vite@latest

select React from the list

then select TypeScript from the list

Now if you are using VSCode type in

code .

In VSCode open a terminal window

and type the following

npm run dev

This should launch the new application in the terminal. 

Now you can load the provided url in your browser to see the default app.

Browser View

Now i just have to figure out how to use it! :)

Following this tutorial so far: https://www.youtube.com/watch?v=SqcY0GlETPk

View Statistics
This Week
13
This Month
13
This Year
5616

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
There is no way to happiness. Happiness is the way.
Unknown
Random CSS Property

env()

The env() CSS function can be used to insert the value of a user agent-defined environment variable into your CSS, in a similar fashion to the var() function and custom properties. The difference is that, as well as being user-agent defined rather than user-defined, environment variables are globally scoped to a document, whereas custom properties are scoped to the element(s) on which they are declared.
env() css reference