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-devkit/core is required

See original GitHub issue

Describe 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:

  1. ng new test-project
  2. follow install guide
  3. ng test
  4. See error

Expected behavior No error

Builder:

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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
just-jebcommented, Nov 11, 2019

@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.

0reactions
just-jebcommented, Jan 18, 2020

Fixed in version 9 (until official release available for installation via @angular-builders/jest@next.

Read more comments on GitHub >

github_iconTop 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 >

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