Installation
How to Start
Welcome to Vue! Vue helps you build modern applications for the web, mobile, or desktop.
For getting started an Vue application you needs two things as Prerequisites.
Prerequisites
Before you begin, make sure your development environment includes
- Node
- npm (Node Package Manager)
Node.js
-
Download the above 20, 22 & below 24 version node.js from nodejs.org.
-
Install Node.js using downloaded file
-
To check your node version, run node -v in a terminal/console window.
npm (Node Package Manager)
-
Vue CLI, and Vue apps depend on features and functionality provided by libraries that are available as npm packages. To download and install npm packages, you must have an npm package manager installed on your system (included with Node.js).
-
This Quick Start uses the npm client command line interface, which is installed with Node.js by default. To check that you have the npm client installed,run npm -v in a terminal/console window.
-
For better understanding Vue we suggest you to once go through official documentation of Vue from VueJS.org .
Vue setup
If you want Kreta theme setup then directly follow next Kreta setup section
Installing Vue CLI
-
Vue apps depend on features and functionality provided by libraries that are available as npm packages. To download and install npm packages, you must have npm package manager.
-
You can create a Vue 3 project without installing the CLI globally by using
npm create, which is the recommended approach
Create Initial Application
-
1. Run the Vue CLI command to create your application (recommended):
npm create vue@latest my-app -
2. The CLI will create a new Vue project in the
my-appfolder. Once created, navigate to the folder:cd my-app
Serve Application
-
1. Install dependencies:
npm install -
2. Launch the development server with the Vue command:
npm run dev
Kreta setup
If you have already download and install node.js and Vue 3 then ignore prerequisites accordingly.
Node.js
Download the above 20,22 & below 24 version node.js from nodejs.org.
Create Initial Application
npm create vue@latest my-app
cd my-app
Setup Kreta theme by
- 1) Download and extract an Kreta Vue theme from themeforest
- 2) Extract it and then go in to theme folder.
- 3) Import all dependency by installing npm command
- 4) Now you are in stage to successfully run Kreta using below command:
- Use Latest Version of node.js
- Remove node_module and package-lock.json file and again do npm install
- You can again download theme from themeforst and then again run
- Then also if you don't solve issue you can generate a ticket.
cd theme
npm install
npm run dev
Once you serve your application by default it will take their default port so you can open port using localhost:5173
Make sure you are not running any other Vue project in local if so then use new generated port from terminal with label called app running at:
1. Build Your Application
To prepare your Vue project for hosting, run the following command in your terminal:
npm run build
This will generate a dist folder inside your project directory. Compress the dist folder into a ZIP file — this is the package you’ll upload to your server.
2. Configure Apache (.htaccess)
If you are hosting on an Apache HTTP Server, create a .htaccess file inside your dist folder (or inside the public folder if that’s your document
root) with the following content:
- Options -MultiViews
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^ index.html [QSA,L]
3. Upload to Server
Upload the contents of your dist folder to the server’s public directory (or the directory your hosting provider specifies as the web root).
4. Deploying to a Subdirectory (Optional)
If you want your Vue app to run inside a subdirectory (for example,
https://example.com/Kreta/), update your vite.config.ts:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
base: "/kreta/", // Replace with your subdirectory name
plugins: [vue()]
})
After updating vite.config.ts, run npm run build again to regenerate the dist folder.