I installed node.js, run apache via xampp, and configured my apache server so that I can use www.example.com as my practice server domain on my local machine.
I started my command prompt as admin and typed the following lines but and they all ran successfully:
$ npm install --global vue-cli
$ vue init webpack my-project
$ cd my-project
$ npm install
$ npm run dev
I followed the cli installation section on https://v2.vuejs.org/v2/guide/installation.html
When I go to my folders, all the vue.js files are installed inside 'my-project', but when I go to my apache server at www.example.com or www.example.com/my-project, a blank page shows. And if I got into my index.html file in the 'my-project' folder and edit it to:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>project3</title>
</head>
<body>
<div id="app">sdfsf</div>
<!-- built files will be auto injected -->
</body>
</html>
I just get a blank page with the text sdfsf. What am I doing wrong? why isn't vue.js hello install screen page loading?
Installation RecapIt may be a good idea to install the Vue CLI locally so that you can lock the version that you are going to be using.
Open in browser To view the project, open a tab and type http://localhost:3000 into the URL bar. That's the address that the Node server is listening to.
You can verify that it is properly installed by simply running vue , which should present you with a help message listing all available commands.
When you run:
npm run dev
It starts a Node JS server. The exact command can be found in package.json
, and you can see the result by going to http://localhost:8080/
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With