Cant create a vue project with CLI
Please follow these commands:
To install the Vue CLI globally on your local system:
npm install -g vue-cli
To initiate a project
vue init webpack vueapp01
cd vueapp01
Start installing the dependencies by using npm again:
npm install
After having completed the installation of packages you can start the web server in development mode by using npm in the following way:
npm run dev
This will start the server on port 8080
and the application output is displayed in the browser automatically.
I am not sure why but it works.
I removed the hidden folder vue-templates (under my user account)
Installed the cli again with sudo npm install -g vue-cli. I thought that I should have problem again because I used sudo, but not.
And then I was able to use vue init webpack voutest without sudo an all the files was editable and not readonly as before.
I also updated npm to 5.8.0
I had the same issue. In my case, the node version was 8.0. I upgraded to 10.0 and it worked.
- I removed all the node modules.
- Removed node 8.x and npm.
- Installed node 10.x and npm
- Install @vue/cli using the npm.