Problems installing Vue js - node.js

I am trying to install vue.js with no success, yet npm is up to date.
When I run vue init webpack vueapp I get this error:
No command 'vue' found, did you mean:Command 'vpe' from package 'texlive-latex-extra' (universe)
vue: command not found
I have already installed the cli using npm install vue-cli.
Thanks

Try to use npm install -g #vue/cli and then vue ui to start client in your browser.

You'll want to use npm install -g #vue/cli. Restart your terminal to make sure it shows up.
Also, make sure you have node 8.9+
From the docs:
Warning regarding Previous Versions
The package name changed from vue-cli to #vue/cli. If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g or yarn global remove vue-cli.
Node Version Requirement
Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with nvm or nvm-windows.

For me sudo helps to solve it.
Try to use this command in terminal:
sudo yarn global add #vue/cli
Then you can check the version and all will work correctly.
vue --version

Have you installed view?
Can you check vue --version
https://cli.vuejs.org/guide/installation.html

Try to use sudo npm install -g #vue/cli instead of npm install -g #vue/cli

You need to use sudo.
The vue-cli documentation at https://cli.vuejs.org/guide/installation.html states that:
To install the new package, use one of the following commands. You
need administrator privileges to execute these unless npm was
installed on your system through a Node.js version manager (e.g. n or
nvm).
npm install -g #vue/cli
# OR
yarn global add #vue/cli

Just run npm install -g pnpm for the missing packages.
Then you can run npm install -g #vue/cli
Now you can ckeck the vue --version

sudo npm install -g #aws-amplify/cli --unsafe-perm=true
It works for my situation.

Related

ng not found even if #angular/cli is global and located in environment variables

I have node.js version 16.14.2 and npm version 8.5.0 and also #angular/cli#13.3.0 I can verify that npm and node is working however #angular/cli that was installed globally can not be found using the ng command. I can also confirm that my environment variables are well set in place. But the main problem is that I still can't call the ng command.
P.S. pay no attention to ng#.0.0.0 I tried doing npm install -g ng
Uninstall "angular cli" and "ng".
Then run the command npm install -g #angular/cli

How do I properly install expo-cli with yarn?

I'm trying to install expo-cli.
When I use npm install -g expo-cli, it installs with the below output.
When I try to run the expo command I get an error that the system cannot find the path specified. I then uninstalled with npm uninstall -g expo-cli
I uninstalled node and npm and cleaned up my system, then I tried installing expo-cli with yarn global add expo-cli. It installed with the following output.
After this, expo init command worked. But when I run expo start in a project folder I get the below output.
I don't know what else to do. I'm on Windows 10.
For Yarn:
If you want to save expo-cli package globally then try
yarn global add expo-cli
and if you want expo-cli to be available in the folder in which you are currently working then use
yarn add expo-cli
For npm:
npm install expo-cli --global
or
npm install expo-cli
There's a similar issue reported here. You can try adding expo to your local project to see if that helps.
Try:
yarn add expo
npm cache clean -f
npm install -g n
sudo n stable
You want to save expo-cli package globally then try
yarn add global expo-cli

Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2)

C:\dev\myApp> ng serve -o
Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2).
The local Angular CLI version is used.
To disable this warning use `"ng config -g cli.warnings.versionMismatch false"`
I don't know what to do with this.
I tried uninstalling angular/cli and npm cache clean but still have problems.
Anyone help me !
You have the old angular/cli package in your package.json
To update use:
npm r angular-cli
npm i #angular/cli#latest -D
Be aware though, if you have already been using the old cli for a long time, you might have to do some code migration. Especially when it comes to tests, polyfills and the angular config file.
You could try to create an empty angular project using the new cli, and compare the files which are created there, with the files you have in your own project, and update where applicable.
After that, when you have to update your cli again, you can use the new ng update command
You are using new project in older CLI you need to run this commands
npm uninstall --save-dev angular-cli
npm install --save-dev #angular/cli#latest
npm install
or you can try this approach
Updating npm :
Run [sudo] npm install -g npm (sudo is only required on Mac/ Linux)
Updating the CLI :
[sudo] npm uninstall -g angular-cli #angular/cli
npm cache clean
[sudo] npm install -g #angular/cli
i have try all command above but, it don't work. Maybe you can try this command for same probblem. it work for me.
ng update #angular/cli #angular/core
npm uninstall --save-dev angular-cli
npm install
if it still problem you can visit : https://angular.io/cli/update
and you can choice "Angular Update Guide" for specify version update from X to X

angular cli install command showing errors

npm install -g #angular/cli
I am trying to install angular cli on Windows 10, I have already installed npm and node, and have verified their version, they are above then what is required for angular cli to install but when I run install command on the prompt it show error.
i have uninstalled npm and node, then reinstalled them, and tried again to install and it worked :) thanks
first try to see node and npm is installed successfully using following commands on cmd
node -v
for node and it will return the version of node,then
npm -v
then it will return the version of npm after that in windows go to environment variables and see node environmental varible is there. after that
npm cache clean --force
use to clean the cache and go to users/Appdata/roaming and delete all the node modules in npm cache folder and restart your computer and give the following command.
npm install -g #angular/cli

Vue-cli generating project stopped

when I try to generate a project with vue-cli, its stopped, that is what i get
>> vue init webpack test
? Project name test
? Project description (A Vue.js project)
Then I cant cancel with ctl + c or something, I hit enter and nothing, im use node v8 and npm v5
I fixed this by first uninstalling the vue-cli by running npm uninstall vue-cli -g then uninstalling my Node.js from the control panel: Then installing the latest current version(not the LTS version) of Node.js then running npm install -g npm then install the vue-cli again using npm install -g vue-cli
In a nutshell update Node.js and npm to the latest versions then install the vue-cli.
Update: In case you use Ubuntu or any Ubuntu base OS:
First, uninstalling the vue-cli by running sudo npm uninstall vue-cli -g then uninstall your current version of Node and install the latest version from here (install the build tools as well) then run sudo npm install -g npm then install the vue-cli again using sudo npm install -g vue-cli

Resources