When creating a new Vue (2.x) project using Vue CLI v4 with the command:
vue create example
...I should be prompted for selecting which features I'd like to enable. For some reason, the CLI jumps straight to creating the project, presumably with features I've selected before.
How can I get the cli to let me specify features again?
It seems your Vue CLI installation is somehow toasted.
As the first fix attempt I'd try deleting the file .vuerc file in your user home directory (~/.vuerc) where Vue CLI stores the saved presets.
If that doesn't help, I'd recommend reinstalling the Vue CLI package globally:
Steps to reinstall Vue CLI globally
# If Vue CLI is installed globally, remove the installation
# Check globally installed packages list with NPM
npm list -g --depth 0
# OR with Yarn
yarn global ls
# Depending on which package manager it has been installed with
# Uninstall with NPM
npm uninstall -g #vue/cli
# OR with Yarn
yarn global remove #vue/cli
# Install currently newest Vue CLI version with NPM
npm install -g #vue/cli
# OR with Yarn
yarn global add #vue/cli
It seems that your project set prompt=false and use JSON to create projects. As far as I know, you should set prompt=true or for each project use should use:
vue create example --default
This should prompt features (>manually select features).
In Vue's Documentation, you can find the create project options creating projects with Vue
In Reactgo page, they showed some features of project creation process How to create Vue project
The issue for me was that I was using Git Bash to vue create app-name instead of Windows CMD.
Once I re-ran the command in Windows CMD the Vue feature selection worked properly.
Related
I'm have some issues when trying to install Vue CLI on my mac device.
I am using the terminal and I also want to work with yarn and not with npm.
These are the commands used:
yarn global add #vue/cli
After doing that I got a message on the terminal where it says that it has been successfully installed. However, when I try to run one of the commands:
"vue" or "vue --version"
I get the following message => zsh: command not found: vue
You should use npm instead it will work.
yarn global remove #vue/cli
and then install using npm.
npm install -g #vue/cli
don't worry! on normally you can use yarn but for global use npm.
solution - 2
yarn global bin
add yarn global directory into your path
Update, i fount the issue. So basically I was missing one extra command.
This is the chronological order for commands:
yarn global add #vue/cli
export PATH="$(yarn global bin):$PATH"
vue
As a newbie, i am trying to properly install yarn via VsCode terminal, and having an issue;
I use
yarn add -g #vue/cli
command to install, after installation i am still not able to use vue ui command(throws: the term ‘vue’ is not recognized as the name of a cmdlet…’), so it made me think of the vue.cmd not installed in my system, then i check my npm directory, i can see 3 different yarn files, but no vue files at all..
I have been using npm before and already uninstalled before yarn installation, with following command:
npm uninstall -g #vue/cli
After uninstalling npm, the vue files in npm directory are gone, as expected.
Is there any other step that I should take to install vue.cmd files(if its necessary)?
Maybe i should not have to uninstall npm, becacuse npm installation brings vue files into my system?
Thank you in advance,
Instead of using:
yarn add -g #vue/cli
Use this command:
yarn global add #vue/cli
Note: If you are on windows you have to use CMD to run vue cli commands. As by default PowerShell doesn't allow to run packages that were installed globally via npm or yarn. You may need to disable PowerShell security to use that package in PowerShell. But I recommend you to use cmd to use the package after installation. But still, you can install the package via PowerShell.
I want to install version 2 of vue.js to use vuetify. However, I don't know the command for that. Could someone pass the command to me please
If you are looking for a specific version of Vue2 you can run the following command with npm: npm install vue#2.x.x or if you want the latest, simply npm install vue.
For vue3 it is: npm install vue#next
Сreated a new Vue.js project using Vue CLI. Select during installation Vue2
vue create my-app
# navigate to new project directory
cd my-app
Add vuetify
vue add vuetify
npm install vue#2.x.x --save
It will update package.json as well.
so later on, if you need to install the project from git, by running
npm install
easily package can be installed
Each time I run quasar dev this message appears.
The installation is pretty standard with pwa template.
These dependencies were not found:
quasar-extras/material-icons/material-icons.css in ./.quasar/client-entry.js
quasar-extras/roboto-font/roboto-font.css in ./.quasar/client-entry.js
quasar-framework/dist/quasar.ie.polyfills.js in ./.quasar/client-entry.js
To install them, you can run: npm install --save quasar-extras/material-icons/material-icons.css quasar-extras/roboto-font/roboto-font.css quasar-framework/dist/quasar.ie.polyfills.js
if you are using quasar-cli, firstly delete it due to quasar-cli doesn't include quasar-extras built-in. You can see this with running quasar info. after deleting quasar-cli please install
npm i -g #quasar/cli
then run
quasar dev
with this way error should be gone.
I think the quasar-cli should be tagged deprecated already. To solve this problem I simply remove the global installation, used the vite setup and currently I am running the quasar commands using npx quasar
I'm trying to install Vue-cli environemnt via NPM.
npm install --global vue-cli
After that I want to create project
vue init webpack my-project
And I get an error
'vue' is not recognized as an internal or external command,
operable program or batch file.
I've read some solutions, most of them concern changing
PATH to C:\Users{YourUser}\AppData\Roaming\npm
Didn't work for me. Can anyone help.
I follow these commands, It's work fine for me.
npm install -g vue-cli
npm install -g vue
Edit the System environment variables, and enter the following path, and if still having a problem just try to add a path in System User Variables
C:\Program Files\nodejs\node.exe;
C:\Users\{UserName}\AppData\Roaming\npm
Check vue installed in C:\Users{UserName}\AppData\Roaming\npm
yarn add #vue/cli-service
or
npm install #vue/cli-service
is what worked for me
Well, problem was solved by simply deleting everything related to vue-cli installed before. And re-installing vue-cli.
I have faced simillar issue and re-installing vue-cli didn't work for me. Strange thing is vue and vue-cli get installed successfully but once I tried to create project by using below command
vue init webpack myfirstproject
I get below error:
'vue' is not recognized as an internal or external command,operable program or batch file.
Tried various solutions but nothing worked for me. Please find my NPM and Node details below:
NPM version: 6.2.0
Node version: 8.7.0
Actually the issue was "vue-cli" is not supporting to my Node(8.7.0). It requires Node >=8.9. Once I upgraded my Node version. everything is working fine.
upgrading your Node version is the correct way to deal with this issue
I found this same issue with another possible problem. I had
create-react-app#1.5.2 installed globally
npm list -g --depth=0 will display your globals
I simply uninstalled create-react-app
npm uninstall create-react-app
Vue vue-cli-service now works as expected.
had the same issue, i deleted my node_modules and re-install and it worked
I had the same problem after searching a lot I found this solution:
You need to Add C:\Program Files\nodejs to your PATH environment variable. To do this follow these steps:
Use the global Search to go to "Environment Variables"
Click "Edit system environment variables"
Click "Environment Variables" in the dialog
In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs.
You will have to restart any currently-opened command prompts before it will take effect.
I hope it works, good luck!
I was installing #vue/cli using yarn, i.e. I ran
yarn global add #vue/cli
Calling vue on windows did not work after the installation ('vue' is not recognized as an internal or external command)
What I needed to do was to add C:\Users\<MY USERNAME>\AppData\Local\Yarn\bin to path.
yarn global add #vue/cli did not work for me
So I removed using yarn global remove #vue/cli
Then I installed using npm install -g #vue/cli and its working fine.
1)Try to remove all the node files, npm and nvm files/folders.
2)Also, remove the PATH of node js and nvm from environment variables.
3)try commands:
node -v
npm -v
nvm -v
above commands only to make sure that all the entities related to node are uninstalled.
4) install node, and if necessary install nvm(optioal), then run command
npm install -g #vue/cli
above procedure proven to be useful for me. Just give it a try!
for Yarn -> need to install it:
npm install -g yarn
Installing Vue CLI Package:
yarn global add #vue/cli
To create project:
vue create project-name
To run:
yarn serve
Uninstalling:
yarn global remove #vue/cli
I follow "npm" package manager instead of "yarn" package manager console because yarn give me a problem while installing it;
command to install Vue CLI:
npm install -g #vue/cli
For to create Vue project:
vue create "project-name"
For to run Vue project:
npm run serve