Skip to content

Commit c99a716

Browse files
dmytroyarmakfilipesilva
authored andcommitted
docs: Improve updating angular cli steps
Add step that removes "angular-cli" from "package.json" to make sure that after upgrading from "angular-cli" to "@angular/cli" only "@angular/cli" is installed into "node_modules". It's needed to avoid problems with npm run scripts that uses "ng" command. Otherwise there will be an error ("You have to be inside an angular-cli project in order to use the test command.") when running "npm start", "npm test" or "npm run ng -- ..." commands. Close #4487
1 parent 198d27a commit c99a716

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,17 @@ Module | `ng g module my-module`
100100

101101
### Updating Angular CLI
102102

103+
If you're using Angular CLI `beta.28` or less, you need to uninstall `angular-cli` package. It should be done due to changing of package's name and scope from `angular-cli` to `@angular/cli`:
104+
```bash
105+
npm uninstall -g angular-cli
106+
npm uninstall --save-dev angular-cli
107+
```
108+
103109
To update Angular CLI to a new version, you must update both the global package and your project's local package.
104110

105111
Global package:
106112
```bash
107-
npm uninstall -g angular-cli @angular/cli
113+
npm uninstall -g @angular/cli
108114
npm cache clean
109115
npm install -g @angular/cli@latest
110116
```

0 commit comments

Comments
 (0)