-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to run load nextjs jest config outside of nx run
#22450
Comments
@jaysoo would you be able to check this bug? |
@FrozenPandaz and @ndcunningham how soon will you be able to pick this up? if you're overloaded I can try to investigate internals of nx and come up with a proposal PR |
@karlismelderis-mckinsey feel free to pick this up if you can |
@karlismelderis-mckinsey @ndcunningham Any update on this? I have to provide additional code to fix the behaviour, which is not not very clean and straightforward. process.env['NX_TASK_TARGET_PROJECT'] = 'app';
process.env['NX_TASK_TARGET_TARGET'] = 'test';
process.env['NX_TASK_TARGET_CONFIGURATION'] = 'development'; |
Was able to fix the issue with the following patch
|
I don't think I see an issue with including |
fixes: #22450 <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> Currently, if you run any next target outside of nx the build will fail because we only fallback for graph creation of if running prod server. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Targets should work if they are run outside of the Nx cli ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # (cherry picked from commit 31c5745)
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
seems that this PR broke simple script:
with latest changes code fails here - https://github.com/nrwl/nx/blob/master/packages/next/plugins/with-nx.ts#L144
because none of these ENV variables are there
Also running jest tests outside of nx (e.g. IntelliJ) is not possible now
everything fails with same error:
maybe
with-nx.ts
need to add'phase-test' === phase
here but I'm not familiar enough with NextJS pluginExpected Behavior
I don't need to run every single script within
nx run ...
GitHub Repo
No response
Steps to Reproduce
try to run knip of jest outside of nx
Nx Report
The text was updated successfully, but these errors were encountered: