-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
[Bug]: Rsbuild: HarmonyLinkingError: export 'Layout' (imported as 'Layout') was not found in '@rive-app/react-canvas' (possible exports: __esModule, default, useRive, useStateMachineInput) #7022
Comments
Hi, thanks for quick responding, but I think the same error still exist, this time I'm using the
will have the following error message: × HarmonyLinkingError: export 'QueryClient' (imported as 'QueryClient') was not found in '@tanstack/react-query' (possible exports: Hydrate, IsRestoringProvider, QueryClientProvider, QueryErrorResetBoundary, __esModule, defaultContext, useHydrate, useInfiniteQuery, useIsFetching, useIsMutating, useIsRestoring, useMutation, useQueries, useQuery, useQueryClient, useQueryErrorResetBoundary) but
I'm using "@rsbuild/core": "1.0.0-alpha.4" which depends on the latest rspack, version: "1.0.0-alpha.1". |
in my case, it was fixed so THANKS @ahabhgk ! But yes @f312213213 , looks like rspack somehow is failing when a library re-exports all modules from an internal dependency 🤔 @ahabhgk do you know if it's a bug in rspack itself? or maybe the libraries (like react query) are not following the standard? 🤔 |
Additional information: When I use "@rsbuild/core": "0.5.9", everything works fine. |
@f312213213 I can't reproduce in my local, could you provide a minimal reproduce? |
Hi @ahabhgk ,The following link is my minimal reproduce. https://codesandbox.io/p/devbox/rsbuild-rive-app-bug-forked-mnlp5y |
System Info
System:
OS: macOS 12.5.1
CPU: (8) arm64 Apple M1
Memory: 343.16 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
npm: 10.5.2 - ~/.nvm/versions/node/v20.13.1/bin/npm
pnpm: 9.4.0 - ~/.nvm/versions/node/v20.13.1/bin/pnpm
Browsers:
Brave Browser: 119.1.60.118
Chrome: 126.0.6478.127
Safari: 15.6.1
Rsbuild:
"@rsbuild/core": "0.7.10",
"@rsbuild/plugin-react": "0.7.10",
Details
I'm getting an error when trying to use
@rive-app/react-canvas
. It looks like the exports from a common-js dependency (@rive-app/canvas) are not being resolved correctly 🤔 .The error says that
@rive-app/react-canvas
doesn't have the exports ofLayout
and other modules but it isn't true. These modules, like Layout, are re-exported from@rive-app/canvas
's rive.js file.Maybe rsbuild/rspack is deleting the
export * from '@rive-app/canvas'
? 🤔Reproduce link
https://codesandbox.io/p/devbox/rsbuild-rive-app-bug-cyjfzp
Reproduce Steps
The text was updated successfully, but these errors were encountered: