Today I am trying to check my vue version But I am facing following error: vue: command not found in VueJS. In this Exerror article, We are going to learn about How to reproduce this error and we will discuss All Possible Solutions Lets Get Start with This Article.
How vue: command not found Error Occurs?
I am trying to check my vue version But I am facing following error.
vue: command not found
So here I am writing all the possible solutions that I have tried to resolve this error.
How To Solve vue: command not found Error?
- How To Solve vue: command not found Error?
To Solve vue: command not found Error if You are Still Facing Above error Then You need to set PATH of your npm folder bin. First of all run this command to get your npm folder path: npm config get prefix And then Export path by running this command with bin folder: export PATH=/usr/local/share/npm/bin:$PATH OR export PATH=$PATH:/Users/myMac/.npm-global/bin And if You are using yarn then run this command: export PATH=$PATH:/home/<user>/.yarn/bin Now, your error will be solved. Thank You.
- vue: command not found
To Solve vue: command not found Error You Just need to reinstall vue-cli by running this command: npm install -g @vue/cli and then set PATH variable in your system and your error will be solved. First of all Just uninstall vue-cli globally by running this command in your terminal: npm uninstall vue-cli -g And then re-install vue-cli globally with this command: npm install -g @vue/cli Now, check your Vue is installed or not by running this command: vue –version If You are able to see vue version then your vue-cli is installed in your system globally and you can create new project with this command: vue create my-project Now, Your error must be solved. Thank You.
Solution 1: re-install vue-cli
To Solve vue: command not found Error You Just need to reinstall vue-cli by running this command: npm install -g @vue/cli and then set PATH variable in your system and your error will be solved.
First of all Just uninstall vue-cli globally by running this command in your terminal.
npm uninstall vue-cli -g
And then re-install vue-cli globally with this command.
npm install -g @vue/cli
Now, check your Vue is installed or not by running this command.
vue --version
If You are able to see vue version then your vue-cli is installed in your system globally and you can create new project with this command.
vue create my-project
Now, Your error must be solved. Thank You.
Solution 2: Export PATH
if You are Still Facing Above error Then You need to set PATH of your npm folder bin. First of all run this command to get your npm folder path.
npm config get prefix
And then Export path by running this command with bin folder.
export PATH=/usr/local/share/npm/bin:$PATH
OR
export PATH=$PATH:/Users/myMac/.npm-global/bin
And if You are using yarn then run this command.
export PATH=$PATH:/home/<user>/.yarn/bin
Now, your error will be solved. Thank You.
Conclusion
It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- Invariant Violation: requireNativeComponent: “RNSScreen” was not found in the UIManager
- Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated’s babel plugin
- npm ERR! Cannot read property ‘pickAlgorithm’ of null
- doesn’t work properly without JavaScript enabled. Please enable it to continue
- ps1 cannot be loaded because running scripts is disabled on this system