Unable to start angular4 app using ng serve - node.js

I am executing following command in my angular 4 app,
ng serve
But i am getting the following error message,
This version of CLI is only compatible with angular version 2.3.1 or
better. Ple ase upgrade your angular version, e.g. by running:
npm install #angular/core#latest
my angular cli version is 1.6.8.
Even i executed the above mentioned command to update my angular cli, but still same error is getting reported.

Perform Following steps:
1. perform npm cache clean --force
2. Reinstall Angular CLI globally using following command:
npm install -g #angular/cli
3. Delete 'node modules folder' and perform npm install for your project and try running it with npm start/ng serve

From the github issue here: https://github.com/angular/angular-cli/issues/5558
The project needs a dev dependency for #angular/compiler-cli.
npm install --save-dev #angular/compiler-cli#<your angular version>
If that doesnt work you can try this:
npm install --save-dev #ngtools/webpack#1.2.13
One of the main contributors of angular-cli said that it is an issue with older webpack versions, reading the github thread should provide some more insight

To resolve the angular cli error, please try following steps :
npm uninstall —save #angular/cli
npm cache clean
npm install —save #angular/cli

Related

npm WARN deprecated #npmcli/move-file#2.0.1: This functionality has been moved to #npmcli/fs

While installing Angular cli using the command:
npm install -g #angular/cli
I am getting this warning.
I am using node version 16.17.0 and npm version 8.19.2
I wanted to install angular cli. But ng command not working
Try the command 'ng v' and check if it asks any question about sharing data about this project with the Angular Team at Google google or any question at all about google say N as no. If it shows angular versions then it means angular/cli is installed
To solve this problem perform following steps:
npm uninstall -g #angular/cli
npm cache clean --force
npm cache verify
npm install -g #angular/cli
ng version
After this moment if you see that powershell is not allowing to execute the script
follow following steps from this site:
Chaman Gautam
and then run ng version(or any ng command you will be able to)
if you see angular
you are good to go !!!
I had the same problem recently. I tried uninstalling angular and reinstalling it but there were already 'ng' files at the location:
C:/Users/<your_user_name>/AppData/Roaming/npm
To resolve the issue, go to that npm folder and delete the following files:
ng
ng.cmd
ng.ps1
Once these files are removed, reinstall angular cli. Follow the guide here to clear the cache and do a clean install:
[https://www.javatpoint.com/uninstall-and-reinstall-angular-cli][1]
The ng command should work now. Check with the below command
ng --version
References:
[1]: https://www.javatpoint.com/uninstall-and-reinstall-angular-cli

Vue create doesn't work - No output from console or Vue UI

As the title states. I can not get the Vue CLI to work. I've tried vue create hello-world. This returns no output. I've also tried vue ui which returns 🚀 Starting GUI... but nothing else.
I've tried.
vue create not working when creating new project in cmd
along with countless others. Clearing npm cache. Setting npm proxy to null then false.
Disconnecting from the internet and running the following commands:
npm uninstall -g vue
npm uninstall -g vue-cli
npm uninstall -g #vue/cli
npm cache clean --force
npm install -g vue
npm install -g #vue/cli
npm audit fix --force
In almost all of the other issues. They get some output to the command line. I can not get anything.
Specs
Windows 11 20H2 Build 22000.739
NodeJs ver: 16.13.2
Vue Cli: Latest
Please make sure node latest version is installed in your machine.
node -v
Then, Download vue from npm registry
npm init vue#latest
Check out Official Docs for more information.

Error while installing project dependency in aurelia js

Hello all I am new to aurelia js . I installed aurelia js through command line using npm install aurelia-cli -g command successfully.
After successful installation , I created one project using command au new , But when I am installing dependencies using command npm install I am getting error as below.
npm ERR! Unexpected end of JSON input while parsing near '...0.1.10"},"devDependen'.
Also I tried it after updating node version but nothing works. I am using below version of node and npm in windows
Node : 10.16.3
NPM : 6.9.0
Any help is appreciated.
This sometimes happens with CLI driven generators. Try the following:
npm cache clean --force
Then:
npm i aurelia-cli -g
You may need to reinitialise your Aurelia Application after doing this.
To further clarify, if the above doesn't work could you post a link to your package.json in a pastebin?

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

Resources