Skip to content
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

[nx-plugin] TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. #29139

Closed
1 of 4 tasks
gperdomor opened this issue Dec 2, 2024 · 0 comments · Fixed by #29189
Assignees
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug

Comments

@gperdomor
Copy link
Contributor

Current Behavior

E2E target of plugins created in Nx 20.2.0-beta.4, fails with the following error:

nx run my-plugin-e2e:e2e

 NX   Jest: Failed to parse the TypeScript config file ~/Projects/sandbox/packages/my-plugin-e2e/jest.config.ts

  TSError: ⨯ Unable to compile TypeScript:
error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.

Pass --verbose to see the stacktrace.

Expected Behavior

e2e target should run without issues

GitHub Repo

No response

Steps to Reproduce

  1. Create a empty workspace with Nx 20.2.0-beta.4 and use the TS solution
  2. Create a new plugin with e2e tests
  3. Run the e2e target

Nx Report

npx nx report         

 NX   Report complete - copy this into the issue template

Node           : 22.11.0
OS             : darwin-x64
Native Target  : x86_64-macos
npm            : 10.9.1

nx                 : 20.2.0-beta.4
@nx/js             : 20.2.0-beta.4
@nx/jest           : 20.2.0-beta.4
@nx/eslint         : 20.2.0-beta.4
@nx/workspace      : 20.2.0-beta.4
@nx/devkit         : 20.2.0-beta.4
@nx/eslint-plugin  : 20.2.0-beta.4
@nx/plugin         : 20.2.0-beta.4
@nx/vite           : 20.2.0-beta.4
@nx/web            : 20.2.0-beta.4
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

Package Manager Version

npm 10.9.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

nx run my-plugin-e2e:e2e

NX Jest: Failed to parse the TypeScript config file ~/Projects/sandbox/packages/my-plugin-e2e/jest.config.ts

TSError: ⨯ Unable to compile TypeScript:
error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.

Pass --verbose to see the stacktrace.

@gperdomor gperdomor changed the title [plugin] TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. [nx-plugin] TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. Dec 2, 2024
@leosvelperez leosvelperez added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Dec 4, 2024
@leosvelperez leosvelperez self-assigned this Dec 4, 2024
jaysoo pushed a commit that referenced this issue Dec 4, 2024
…t executor (#29189)

<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29139
AgentEnder pushed a commit that referenced this issue Dec 20, 2024
<!-- 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 -->
Nx Plugin do not have the option to use Vitest as test runner

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
This PR allow us to use Vitest as test runner in plugins projects.

Vitest for e2e targets is still missing and a new PR will be raised
after #29139 is fixed

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants