Vue - Plugins won't Install - vue.js

I've tried to install the Vue Router and Vuex plugins, but the terminal simply stays like this indefinitely.
Vue is fully up to date and I'd tried reinstalling it, but to no avail.
I've also tried installing via the Vue UI but the same problem persists. Any idea what could be wrong? Thanks in advance.

Close Terminal and open again and try this steps.
npm install vue-router
npm install vuex

Related

How can I install vuex in a vue CLI project?

I install and create a project vue with VUE CLI.
I would like to add VUEX to add a store in my app.
But when I use:
npm install vuex --save-dev
I have errors:
Could not resolve dependency:peer vue#"^2.0.0" from vuex#3.6.2 node_modules/vuex vuex#"*" from the root project
How can I fix this?
Should I install vue in other way?
There are two ways to add vuex in Vue Cli Project
1 The following documentation can help you
npm install vuex
Another one is
vue add vuex
If you have problems with the command line, you can also add vuex with the User Interface. Just type vue ui and install vuex under plugins tab in the browser window, which just opened (at port 8000)
To install the latest version you can use:
npm install vuex#next --save
As stated in the documentation, the following command can help you:
yarn add vuex

Vue: not responding to commands

I installed vue using
npm install vue
But the terminal wasn't recognizing "vue" command (like vue --version), so I hitted:
npm install -g vue-cli#2.7.0
And now it says I have version 2.7.0 when I check the version, but it doens't respond neither shows any error when I try:
vue ui
It just doesn't run. Can anyone help?
That is no longer the name of the Vue CLI package. You will need to install from #vue/cli as detailed here: https://cli.vuejs.org/guide/installation.html

vue packages version mismatch vue#1.0.28-csp

I'm new to npm & vue and have followed instructions to install both.
When I run vue create, I get the follwing
Vue packages version mismatch:
- vue#1.0.28-csp (C:\Users....vue.common.js)
- vue-template-complier#2.6.10 (c:\Users.....package.json)
How do I fix this?
I've seen others with a similar problem but not with the -csp file
My Vue version is 3.11.0.
I've fixed the issue but I'm not sure how!
I uninstalled vue and then tried again:
npm install -g #vue/cli
vue init webpack vueapp01 - I didn't do this last time, so maybe this is the answer!
Now when I do vue create hello-world, it works!
Thanks for your help #Ohgodwhy
Your vue-cli version is 3.11.0, not your vue version. You have globally installed version of vue at 1.0.28-csp. What you should do is:
npm update -g vue
or
yarn global update vue
which should bring it in line with the template compiler.

How to upgrade from Vuetify 1.5 to 2.0

I'm trying to use the vuetify#2.0.0-alpha.17 rather than the 1.5.13 that it automatically starts with when I use vue add Vuetify. then I try this post Update Vuetify version method. I do
vue create my-app
cd my-app
vue add Vuetify
npm uninstall -S vuetify
npm install -S vuetify#2.0.0-alpha.17
and just get error
This dependency was not found:
* vuetify/src/stylus/app.styl in ./src/plugins/vuetify.js
To install it, you can run: npm install --save vuetify/src/stylus/app.styl
oh ok that's how install it. no that just gives an error too. Like I just want to start working with 2.0.0 so that when they release it- hopefully soon- I don't have to rebuild everything. Not sure why it's so hard like tell us in the docs how to do it not everybody is a wizard and googling the problem doesn't work
Comment out import 'vuetify/src/stylus/app.styl' in your src/plugins/vuetify.js file.
add import 'vuetify/src/styles/main.sass'
then npm install sass-loader
Vuetify v2 does not use the stylus. Remove import 'vuetify/src/stylus/app.styl' from src/plugins/vuetify.js. Or downgrade your vuetify plugin to 1.5.x (not recomended).

Failed to download repo vuejs-templates/simple

This error shows when I try to run a vue init webpack command.
vue-cli ยท Failed to download repo vuejs-templates/simple: unable to verify the first certificate
Pls help! I want to proceed and learn vue.
Thanks in advance!
You can also try to clone the git repo and then initiate project offline
git clone https://github.com/vuejs-templates/simple ~/.vue-templates/simple
vue init simple my-project --offline
cd my-project
npm install
npm run dev
credits https://github.com/vuejs/vue-cli/issues/258#issuecomment-325021153
The problem here seems to be the environment where you are tying to download the template, Are you through a proxy?. One solution is forking the template you want, and then init vue in that template, but i can't tell if this works for all cases.
Fork the desired template, in your case webpack from https://github.com/vuejs-templates/webpack
And then just init it by using vue init yourGithubUsername/webpack
Someone encountered the same problem as yours, referencing on this issue, it is very likely you are behind VPN, try running this instead:
npm config set npm_config_strict_ssl=false
vue init webpack my-project