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

Get error with TypeError: userDefinedConfig is not a function when using with @nx/rspack #29514

Closed
4 tasks
AdrianDuan opened this issue Jan 5, 2025 · 5 comments · Fixed by #29515
Closed
4 tasks
Assignees
Labels
outdated scope: bundlers Issues related to webpack, rollup type: bug

Comments

@AdrianDuan
Copy link
Contributor

Current Behavior

When create and build with a custom rspack monorepo, @nx/rspack get error with TypeError: userDefinedConfig is not a function

Expected Behavior

@nx/rspack should read rspack config as expected

GitHub Repo

No response

Steps to Reproduce

  1. create an empty sub-app
  2. add rspack.config.cjs
  3. add @nx/rspack and custom build config

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.12.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.15.2

nx (global)        : 20.3.0
nx                 : 20.3.0
@nx/js             : 20.3.0
@nx/jest           : 20.3.0
@nx/eslint         : 20.3.0
@nx/cypress        : 20.3.0
@nx/devkit         : 20.3.0
@nx/eslint-plugin  : 20.3.0
@nx/next           : 20.3.0
@nx/plugin         : 20.3.0
@nx/react          : 20.3.0
@nx/rollup         : 20.3.0
@nx/rspack         : 20.3.0
@nx/storybook      : 20.3.0
nx-cloud           : 19.1.0
typescript         : 5.6.3
---------------------------------------
Community plugins:
@nrwl/cypress : 19.8.4
nx-electron   : 20.0.0
nx-stylelint  : 17.1.6

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

@AdrianDuan
Copy link
Contributor Author

I create a MR to fix this #29515

@synelokk
Copy link

Do you have any updates about this issue?

@eXist-FraGGer
Copy link

I have the same with TS config: rspack.config.ts

@ICEDLEE337
Copy link

same issue w/ NestJS and @nx/rspack after running npx nx g @nx/rspack:configuration to add to an existing NestJS app.

@AgentEnder AgentEnder added the scope: bundlers Issues related to webpack, rollup label Jan 22, 2025
isaacplmann pushed a commit that referenced this issue Feb 11, 2025
…nction' (#29514) (#29515)

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

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

Fixes #29514

---------

Co-authored-by: Colum Ferry <[email protected]>
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: bundlers Issues related to webpack, rollup type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants