briebug/jest-schematic

Unable to install jest-schematic on Angular 12

Closed this issue · 2 comments

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/jest@1.3.1.
✔ Package information loaded.

The package @briebug/jest@1.3.1 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"]

Looks like you may be using the first version (@briebug/jest) of this package which has since been renamed (@briebug/jest-schematic).

Can you remove the old package and run ng add @briebug/jest-schematic

Please reopen if you're able to reproduce with ng add @briebug/jest-schematic