Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global angular-cli is @angular/cli@7.3.5 but generated project is v6.x #29296

Closed
ovione opened this Issue Mar 14, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@ovione
Copy link

ovione commented Mar 14, 2019

First @angular-cli is not installed

ng -version

I have the message

'ng' is not recognized as an internal or external command

I install the latest version of angular with:

npm install -g @angular/cli

I list global dependencies

npm list -g --depth=0

I get

+-- @angular/cli@7.3.5

I check its version

ng --version

I have instead of version 7.3.5 the old version 6.2.8

Angular CLI: 6.2.8 Node: 10.14.2 OS: win32 x64 Angular:

When I generate a new project with

ng new newapp

in my package.json I have the old version of @angular-cli 6.2.8 and angular 6.1.0

{ "name": "newapp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^6.1.0", "@angular/common": "^6.1.0", "@angular/compiler": "^6.1.0", "@angular/core": "^6.1.0", "@angular/forms": "^6.1.0", "@angular/http": "^6.1.0", "@angular/platform-browser": "^6.1.0", "@angular/platform-browser-dynamic": "^6.1.0", "@angular/router": "^6.1.0", "core-js": "^2.5.4", "rxjs": "~6.2.0", "zone.js": "~0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.8.0", "@angular/cli": "~6.2.8", "@angular/compiler-cli": "^6.1.0", "@angular/language-service": "^6.1.0", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.3.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~2.9.2" } }
How can I generate an @angular-cli project version 7 or 8 ?
what I'm doing wrong ?

@Airblader

This comment has been minimized.

Copy link
Contributor

Airblader commented Mar 14, 2019

Why do you just reopen #29274? It was closed because 1) the issue tracker isn't for support questions and 2) this relates to the CLI, not the framework.

@gkalpak

This comment has been minimized.

Copy link
Member

gkalpak commented Mar 14, 2019

@ovione, it sounds like you have multiple cli versions installed (maybe you had installed v6 globally using yarn or something). I suggest you find the old versions and uninstall them, before installing the latest one. (You can use which ng or where ng (depending on your OS).)

In any case, this is not related to the Angular framework itself (the cli is a separate project), so closing...

@gkalpak gkalpak closed this Mar 14, 2019

@ovione

This comment has been minimized.

Copy link
Author

ovione commented Mar 14, 2019

@gkalpak

This comment has been minimized.

Copy link
Member

gkalpak commented Mar 14, 2019

Yeah, this seems to be a typo in @kara's message. https://github.com/angular/angular-cli is indeed the correct repo for cli issues. Sorry for the confusion.

That said, yours doesn't sound like a cli issue either. As I mentioned in my previous comment, you have most likely multiple global installations of @angular/cli and the 6.x one is taking precedence over the 7.x one (this is based on their relative order of appearance on your PATH anvironment variable).

@ovione

This comment has been minimized.

Copy link
Author

ovione commented Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.