So, I've broken my local installation after install moment plugin. This Momento plugin
After this installation, when I put command ng serve
to running project, the return by the console is:
Cannot determine versions of "@angular/cli". This likely means your local installation is broken. Please reinstall your packages.
I've followed this: Could not find module "@angular-devkit/build-angular" but nothing.
So, I've tried to reinstall angular, but nothing, I've tried to run npm update but nothing... I don't know how to fix this, and I need to work.
Also, tried to re-checkout by git, but nothing.
The project was born in Angular 7 with Material. How can fix this?
Use the command ng --version (or ng -v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to find out the globally installed version of Angular.
The Angular latest Official stable version is Angular v13. 2.5, which is released on 2nd March 2022.
Checking the Angular VersionOpen the Terminal + view in your project and type ng --version . For recent versions of Angular, this will list the versions of several Angular packages that you have installed in your project.
Restore your old package.json / package-lock.json, then delete all your contents of node_modules. After, from your project root run the following to rebuild the contents of node_modules:
npm install
.
If you don't have a copy of the package files from before the problems started, first, uninstall moment - local and global - to prevent it from installing itself when you run npm install
.
npm uninstall moment ngx-moment
npm uninstall -g moment ngx-moment
Then go with the step of deleting all your node_modules contents before running npm install
in your project root.
Please, check your version of @angular/cli
(both, local and global) as Angular 8 is released. Also, try to match your version with current ngx-moment's @angular/cli
version (i.e. "@angular/cli": "~7.0.3"
as of June 2019)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With