Skip to content

docs: Improve "updating angular cli" steps#4487

Closed
dmytroyarmak wants to merge 1 commit into
angular:masterfrom
dmytroyarmak:docs-uninstall-angular-cli-on-update
Closed

docs: Improve "updating angular cli" steps#4487
dmytroyarmak wants to merge 1 commit into
angular:masterfrom
dmytroyarmak:docs-uninstall-angular-cli-on-update

Conversation

@dmytroyarmak
Copy link
Copy Markdown
Contributor

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.

Here are related issues: #4463, #4439

@hansl
Copy link
Copy Markdown
Contributor

hansl commented Feb 7, 2017

This is a temporary pain, but should not be part of the update steps. Could you rephrase it to say something like "if you're using the old angular-cli, please do npm uninstall -g angular-cli" ?

@dmytroyarmak dmytroyarmak force-pushed the docs-uninstall-angular-cli-on-update branch from c9a79d2 to 78f1f94 Compare February 7, 2017 20:36
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.
@dmytroyarmak dmytroyarmak force-pushed the docs-uninstall-angular-cli-on-update branch from 78f1f94 to c157beb Compare February 7, 2017 20:38
@dmytroyarmak
Copy link
Copy Markdown
Contributor Author

Thank you @hansl
I've separated removing of angular-cli to separate steps. Does it sound better now?

@dmytroyarmak dmytroyarmak force-pushed the docs-uninstall-angular-cli-on-update branch from 10dcd08 to c157beb Compare February 7, 2017 20:46
Copy link
Copy Markdown
Contributor

@Meligy Meligy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a good chance to replace the part just after that, about ng update , to tell you to follow the breaking changes in CHANGELOG instead.

asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
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 angular#4487
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants