Title: New Angular projects install jasmine-core ~5.7.0 but use 4.6.1 · Issue #30575 · angular/angular-cli · GitHub
Open Graph Title: New Angular projects install jasmine-core ~5.7.0 but use 4.6.1 · Issue #30575 · angular/angular-cli
X Title: New Angular projects install jasmine-core ~5.7.0 but use 4.6.1 · Issue #30575 · angular/angular-cli
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description The package.json file generated by ng new includes the dev dependency "jasmine-core": "~5.7.0", but jasmine-core 4.6.1 is al...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description The package.json file generated by ng new includes the dev dependency "jasmine-core"...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description The package.json file generated by ng new includes the dev dependency "jasm...
Opengraph URL: https://github.com/angular/angular-cli/issues/30575
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New Angular projects install jasmine-core ~5.7.0 but use 4.6.1","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nDon't known / other\n\n### Is this a regression?\n\nYes\n\n### Description\n\nThe package.json file generated by `ng new` includes the dev dependency `\"jasmine-core\": \"~5.7.0\"`, but jasmine-core 4.6.1 is also installed and used to run tests in Karma.\nSteps to reproduce:\n\n1. Install @angular/cli 20.0.3.\n2. Run `ng new some-name` and accept all the defaults.\n3. Note the jasmine-core dependency in package.json.\n4. Run `npm test` and note the Jasmine version displayed in the browser.\n5. Run `npm ls jasmine-core`.\n\nExpected: The versions from steps 3 and 4 agree, and step 5 shows that only a single version of jasmine-core is installed.\nObserved: Step 3 and 4 show different major versions, and step 5 shows that two different versions of jasmine-core are installed.\n\nThe problem is that karma-jasmine declares a dependency on jasmine-core 4.x. `ng new` tries to set up the project to use jasmine-core 5.x, but it doesn't add [the necessary override](https://jasmine.github.io/pages/faq.html#001-karma).\n\nNote: I'm not an Angular user, but I do maintain Jasmine. I've seen this version mismatch cause a couple of problems. One is that Angular users are occasionally confused about which major version of jasmine-core they're actually using. The other is that it makes jasmine-core download statistics pretty much useless for determining uptake of the latest major version, since an unknown but probably large portion of 5.x downloads are from Angular users who are actually still running 4.x.\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n```true\n\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 20.0.3\nNode: 20.19.0\nPackage Manager: npm 10.8.2\nOS: darwin arm64\n\nAngular: 20.0.4\n... common, compiler, compiler-cli, core, forms\n... platform-browser, router\n\nPackage Version\n------------------------------------------------------\n@angular-devkit/architect 0.2000.3\n@angular-devkit/core 20.0.3\n@angular-devkit/schematics 20.0.3\n@angular/build 20.0.3\n@angular/cli 20.0.3\n@schematics/angular 20.0.3\nrxjs 7.8.2\ntypescript 5.8.3\nzone.js 0.15.1\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/sgravrock","@type":"Person","name":"sgravrock"},"datePublished":"2025-06-21T19:02:54Z","url":"https://github.com/angular/angular-cli/issues/30575"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b2a8d47d-6b70-35fc-299b-f39833d35ccb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9548:BB75:117BF25:172CC55:6B01E84D |
| html-safe-nonce | 786564a1ae6659a38cb6f61369dc1dfbad3dbf45ac73f1b53c441be1ca396a5f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTQ4OkJCNzU6MTE3QkYyNToxNzJDQzU1OjZCMDFFODREIiwidmlzaXRvcl9pZCI6IjM1MDMzNzg0NzAyMDA4NzM3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7f93bb0d9eda24ddec361d1e30ca8601254b0e3f91372510616d92dbc8a236cc |
| hovercard-subject-tag | issue:3165507694 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/30575/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2433f6ce6e074ff175314c50b6a13516097ba0355469d17e50e1d1aeb8e8f6b6/angular/angular-cli/issues/30575 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2433f6ce6e074ff175314c50b6a13516097ba0355469d17e50e1d1aeb8e8f6b6/angular/angular-cli/issues/30575 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description The package.json file generated by ng new includes the dev dependency "jasmine-core"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sgravrock |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width