question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular CLI v8 `ng new` generates Angular v7 files

See original GitHub issue

🐞 Bug report

Command (mark with an x)

- [x ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Probably not

Yes, the previous version in which this bug was not present was...

Description

A clear and concise description of the problem...

The package.json file created with ng new is set to version 7 files instead of version 8 files.

πŸ”¬ Minimal Reproduction

  1. Installed Angular CLI v8.01
  2. ng new myApp
  3. Opened the package.json file and the versions are set to 7.x
  "dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "core-js": "^2.5.4",
    "rxjs": "~6.3.3",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  },

πŸ”₯ Exception or Error





🌍 Your Environment



Angular CLI: 8.0.1
Node: 10.15.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.800.1
@angular-devkit/core         8.0.1
@angular-devkit/schematics   8.0.1
@schematics/angular          8.0.1
@schematics/update           0.800.1
rxjs                         6.4.0


Anything else relevant?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
markgohocommented, Jun 2, 2019

I don’t know if this picture is accurate, but what it sounds like is that you were in a directory with a node_modules folder that contained v7 of the Angular CLI and when running ng new myApp it installed Angular v7.

After removing the node_modules folder, and running the command again, npm used the global version of the Angular CLI (v8) and installed v8 of Angular.

If this is accurate, there isn’t a bug here, this is just the way node and npm work.

0reactions
angular-automatic-lock-bot[bot]commented, Dec 17, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
CLI Overview and Command Reference - Angular
The ng new command creates an Angular workspace folder and generates a new application skeleton. A workspace can contain multiple applications and libraries....
Read more >
ng generate - Angular
Generates and/or modifies files based on a schematic. ng ... Generates a new basic application definition in the "projects" subfolder of the workspace....
Read more >
Setting up the local environment and workspace - Angular
Create a workspace and initial applicationlink Β· Run the CLI command ng new and provide the name my-app , as shown here: content_copy...
Read more >
Angular workspace configuration
The angular.json file at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found