I'm trying to run testing on a Nrwl monorepo library (called core). I'm using the nx console. And it generates the following command
ng test core
when I run it I keep getting the following error
[error] Error: Cannot find module 'jest'
Require stack:
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@nrwl\jest\src\builders\jest\jest.impl.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\models\architect-command.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\commands\test-impl.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\models\command-runner.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\lib\init.js
- C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@angular\cli\bin\ng
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\Shane\Documents\Visual Studio 2019\Projects\Inigo-Angular-Monorepo-9964511ce0aea6b2d4904e42e7ac0e055f77122e\node_modules\@nrwl\jest\src\builders\jest\jest.impl.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
I get the same error on every other library or app that I try to test.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire