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 #13917

Closed
ovione opened this Issue Mar 14, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@ovione
Copy link

ovione commented Mar 14, 2019

First @angular-cli is not installed globally in my windows pc. I find out with:

ng -version

I have the message

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

when I do

where ng

I have

INFO: Could not find files for the given pattern(s).

So with that info I suppose I don't have @angular-cli installed globally.

What I have are a lot of projects where I use @angular-cli version 6 but not installed globally.

For that reason I install the latest version of angular with:

npm install -g @angular/cli@latest

Now if I list global dependencies

npm list -g --depth=0

I get the correct one

+-- @angular/cli@7.3.5

Now if 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 ?
If I have installed version 7 globally why ng version gives me version 6 instead of 7 ?
I must have somwhere a angular-cli version 6 that is still being picked up.

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

alan-agius4 commented Mar 14, 2019

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

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.