Create new vue project on windows
Here are the steps to create a new Vue.js project on Windows:
Method 1: Using Vue CLI
-
Open a Command Prompt or PowerShell as an administrator.
-
Install Vue CLI by running the following command:
npm install -g @vue/cli
-
Create a new project by running the following command:
vue create my-vue-app
Replace
my-vue-app
with the name of your project. -
Follow the prompts to choose the project template and configuration options.
-
Once the project is created, navigate to the project directory:
cd my-vue-app
-
Start the development server by running:
npm run serve
This will start the development server and open your project in your default web browser.
Method 2: Using Vue CLI with a specific version
If you want to use a specific version of Vue CLI, you can specify it when installing:
npm install -g @vue/[email protected]
Replace 2.9.6
with the version you want to use.
Method 3: Using Vue CLI with a specific template
If you want to use a specific template, you can specify it when creating the project:
vue create my-vue-app --template webpack
Replace my-vue-app
with the name of your project and webpack
with the template you want to use.
Method 4: Using Vue CLI with a specific configuration
If you want to use a specific configuration, you can specify it when creating the project:
vue create my-vue-app --config vue.config.js
Replace my-vue-app
with the name of your project and vue.config.js
with the configuration file you want to use.
That's it! You should now have a new Vue.js project created on your Windows machine.