jest-schematic icon indicating copy to clipboard operation
jest-schematic copied to clipboard

Unable to install jest-schematic on Angular 12

Open cr1979 opened this issue 3 years ago • 0 comments
trafficstars

Describe the bug Installing @briebug/jest with "ng add @briebug/jest" is not working on an existing project. I will receive following errors: PS C:\Users\xxx\development\s4c_update> ng add @briebug/jest

ℹ Using package manager: npm ✔ Found compatible package version: @briebug/[email protected]. ✔ Package information loaded.

The package @briebug/[email protected] will be installed and executed. Would you like to proceed? Yes ✔ Package successfully installed. An unhandled exception occurred: Cannot find module 'C:\Users\xxx\development\s4c_update\node_modules@briebug\jest\src\jest\index' Require stack:

  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\models\schematic-engine-host.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\models\schematic-command.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\commands\add-impl.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular-devkit\schematics\tools\export-ref.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular-devkit\schematics\tools\index.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\utilities\json-schema.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\models\command-runner.js
  • C:\Users\xxx\development\s4c_update\node_modules@angular\cli\lib\cli\index.js
  • C:\Users\xxx\AppData\Roaming\npm\node_modules@angular\cli\lib\init.js
  • C:\Users\xxx\AppData\Roaming\npm\node_modules@angular\cli\bin\ng See "C:\Users\xxx~1\AppData\Local\Temp\ng-kJFkZe\angular-errors.log" for further details.

To Reproduce Steps to reproduce the behavior: go into a Angular 12 project an

  1. Go into an existing Angular 12 project'
  2. Run command 'ng add @briebug/jest'
  3. See error

Expected behavior Install briebug/jest-schematic

Desktop (please complete the following information):

  • OS: Windows 10
  • Node version: 15.12.0
  • App type Angular CLI
  • Angular version [@angular/core: "~12.1.1"]

cr1979 avatar Mar 23 '22 10:03 cr1979