After upgrade from "@nrwl/cli": "13.10.0" to "@nrwl/cli": "14.3.6", tests fail. This is probably due to the migration tool not installing ts-node. After manual installation of said package, the tests pass again.
Current Behavior
Jest tests fail after upgrading from "@nrwl/cli": "13.10.0" to "@nrwl/cli": "14.3.6".
Expected Behavior
Jest tests should pass after the upgrade.
Steps to Reproduce
Create a typescript library project with nx 13.10.0
Write a basic test and run; it should pass
Upgrade the project to nx 14.3.6 using nx migrate
Try to run the same test again; it should fail with the error given in the logs below
npx nx test codility
> nx run codility:test
Jest: Failed to parse the TypeScript config file /home/batbrain9392/Practice/ds-algo-practice/packages/codility/jest.config.ts
Error: Jest: 'ts-node' is required for the TypeScript configuration files. Make sure it is installed
Error: Cannot find module 'ts-node'
Require stack:
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/jest-config/build/readConfigFileAndSetRootDir.js
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/jest-config/build/index.js
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/@nrwl/jest/src/executors/jest/jest.impl.js
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/nx/src/config/workspaces.js
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/nx/src/command-line/run.js
- /home/batbrain9392/Practice/ds-algo-practice/node_modules/nx/bin/run-executor.js
Environment
npx nx report
> NX Report complete - copy this into the issue template
Node : 16.15.1
OS : linux x64
npm : 8.12.2
nx : 14.3.6
@nrwl/angular : Not Found
@nrwl/cypress : Not Found
@nrwl/detox : Not Found
@nrwl/devkit : 14.3.6
@nrwl/eslint-plugin-nx : 14.3.6
@nrwl/express : Not Found
@nrwl/jest : 14.3.6
@nrwl/js : 14.3.6
@nrwl/linter : 14.3.6
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 14.1.2
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : Not Found
@nrwl/web : Not Found
@nrwl/workspace : 14.3.6
typescript : 4.7.4
---------------------------------------
Community plugins:
(node:35696) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/batbrain9392/Practice/ds-algo-practice/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
After upgrade from
"@nrwl/cli": "13.10.0"
to"@nrwl/cli": "14.3.6"
, tests fail. This is probably due to the migration tool not installingts-node
. After manual installation of said package, the tests pass again.Current Behavior
Jest tests fail after upgrading from
"@nrwl/cli": "13.10.0"
to"@nrwl/cli": "14.3.6"
.Expected Behavior
Jest tests should pass after the upgrade.
Steps to Reproduce
13.10.0
14.3.6
usingnx migrate
Check this commit for the issue.
Failure Logs
Environment