New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '../../jest.preset' on nx migrate latest #9973
Comments
Very similar issue here, but the error is about
Environment
Node : 16.13.2 nx : 14.0.3
|
@chrislambe @justinhandley it looks to be related to how the migration updates the preset and so it requires reading your jest.config.js through I'm updating this migration to not do this anymore as we actually don't need to update the preset property in the configs anymore. this change is going to be a part of the change to |
Can i simply manually do the migration? if i'm correct it only renames files from js to ts extension? |
So, for me it was that I was running react-native and the upgrade to 13 changed this const workspacePreset = require('../../jest.preset') to no longer use workspacePreset, but instead to use resolver: '@nrwl/jest/plugins/resolver', But, the migration didn't remove the require at the top. I took that out and ran it again and it was fine. |
…e `export default` (#10035) * fix(testing): jest.preset.ts => jest.preset.js * fix(testing): update to export default * fix(testing): migration for moving to export default * fix(testing): add eslint ignore comments for jest config properties fixes: #10021 * fix(testing): update tsconfig.spec.json for next apps with project parserOptions fixes: #9982 * fix(testing): prevent renaming root jest preset fixes: #9973 * fix(testing): update snapshots for export default * fix(testing): bump migration version to run * fix(testing): make sure default jest tests pass for various projects * fix(js): generate correct jest config for --compiler=swc --js
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
When running nx migrate latest to version 14.02 I get
Running migration update-jest-config-extensions
Cannot find module '../../jest.preset'
But it doesn't specify where it can't find it - I searched all instances of that and the all correctly pointed to a jest preset file in root.
Expected Behavior
One the migration, I expect it to work or give more useful feedback.
Steps to Reproduce
Just run nx migrate latest - but obviously the entire project structure isn't easy to replicate.
Failure Logs
Running migration update-jest-config-extensions
Cannot find module '../../jest.preset'
Require stack:
Environment
NX Report complete - copy this into the issue template
Node : 16.10.0
OS : darwin x64
yarn : 1.22.17
nx : 14.0.2
@nrwl/angular : 14.0.2
@nrwl/cypress : 14.0.2
@nrwl/detox : 14.0.2
@nrwl/devkit : 14.0.2
@nrwl/eslint-plugin-nx : 14.0.2
@nrwl/express : Not Found
@nrwl/jest : 14.0.2
@nrwl/js : 14.0.2
@nrwl/linter : 14.0.2
@nrwl/nest : 14.0.2
@nrwl/next : Not Found
@nrwl/node : 14.0.2
@nrwl/nx-cloud : 13.3.1
@nrwl/nx-plugin : Not Found
@nrwl/react : 14.0.2
@nrwl/react-native : 14.0.2
@nrwl/schematics : Not Found
@nrwl/storybook : 14.0.2
@nrwl/web : 14.0.2
@nrwl/workspace : 14.0.2
typescript : 4.6.3
rxjs : 6.5.5
Community plugins:
@nxpm/stack: 4.18.0
The text was updated successfully, but these errors were encountered: