Angular 6 has new CLI command ng add <package>
.
How can I remove the package using Angular CLI?
UPDATE
documentation
ng add
will use your package manager to download new dependencies and invoke an installation script (implemented as a schematic) which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code
It is not the same npm install <package>
I was trying to use ng rm
but it is not working yet.
The Best Answer is. You can use npm uninstall <package-name> will remove it from your package. json file and from node_modules. If you do ng help command, you will see that there is no ng remove/delete supported command.
A global package is a package that is installed globally on your machine, so you don't have to reinstall it every you need it. To remove a global package, you need to attach the -g flag to npm uninstall, and then specify the name of the package. The basic syntax for doing this is npm uninstall -g package-name .
You can use npm uninstall <package-name>
will remove it from your package.json file and from node_modules.
If you do ng help
command, you will see that there is no ng remove/delete
supported command. So, basically you cannot revert the ng add
behavior yet.
It's an open issue #900 on GitHub, unfortunately at this point of time it looks that in Angular CLI there's nothing like ng remove/rm/
..., only using npm uninstall DEPENDENCY
is the current workaround.
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