@angular-devkit/core is required
See original GitHub issueDescribe the bug
Without @angular-devkit/core
running ng test
will fail with below error. Adding this package is not described in the installation guide.
[error] TypeError: core_1.experimental.workspace.Workspace.fromPath is not a function
at omitted\node_modules\@angular-builders\jest\dist\index.js:26:73
at Generator.next (<anonymous>)
at omitted\node_modules\@angular-builders\jest\dist\index.js:7:71
at new Promise (<anonymous>)
at __awaiter (omitted\node_modules\@angular-builders\jest\dist\index.js:3:12)
at getRoots (omitted\node_modules\@angular-builders\jest\dist\index.js:22:12)
at omitted\node_modules\@angular-builders\jest\dist\index.js:48:58
at Generator.next (<anonymous>)
at omitted\node_modules\@angular-builders\jest\dist\index.js:7:71
at new Promise (<anonymous>)
To Reproduce Steps to reproduce the behavior:
- ng new test-project
- follow install guide
- ng test
- See error
Expected behavior No error
Builder:
- The name of the builder: @angular-builders/jest
- The version of the builder: 8.0.4
Additional context
Angular CLI: 8.2.0
Node: 12.4.0
OS: win32 x64
Angular: 8.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.802.0
@angular-devkit/build-angular 0.802.0
@angular-devkit/build-optimizer 0.802.0
@angular-devkit/build-webpack 0.802.0
@angular-devkit/core 8.2.0 (cli-only) <---- this is the problem
@angular-devkit/schematics 8.2.0
@angular/cdk 8.1.2
@ngtools/webpack 8.2.0
@schematics/angular 8.2.0
@schematics/update 0.802.0
rxjs 6.5.2
typescript 3.5.3
webpack 4.38.0
Fix
npm i -D @angular-devkit/core
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top Results From Across the Web
angular-devkit/core - npm
Angular DevKit - Core Utility Library. Latest version: 15.0.4, last published: 12 days ago. Start using @angular-devkit/core in your project ...
Read more >ng command throws error; @angular-devkit/core seems to be ...
Actually, all you need is to add missing @angular-devkit/core . For some reason it's missing in the new ng new process.
Read more >@angular-devkit/core - npm Package Health Analysis | Snyk
The npm package @angular-devkit/core was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >@angular-devkit/core | Yarn - Package Manager
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command...
Read more >Fixing Could not find module @angular-devkit/build-angular ...
To fix Could not find module angular-devkit-build-angular error in Angular follow the below steps 1. Delete node_modules folder and run npm ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arturovt This error is not easily reproducible but it exists. In the next major release (9.0.0) all the required packages (core, architect etc.) will be direct dependencies of the builders and this problem will be solved. Unfortunately cannot fix it for version 8.x.x because it is a breaking change.
Fixed in version 9 (until official release available for installation via
@angular-builders/jest@next
.