Skip to content

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

@ovione

Description

@ovione

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions