Git Product home page Git Product logo

[Bug]: Rsbuild: HarmonyLinkingError: export 'Layout' (imported as 'Layout') was not found in '@rive-app/react-canvas' (possible exports: __esModule, default, useRive, useStateMachineInput) about rspack HOT 5 CLOSED

GiancarlosIO avatar GiancarlosIO commented on July 23, 2024 1
[Bug]: Rsbuild: HarmonyLinkingError: export 'Layout' (imported as 'Layout') was not found in '@rive-app/react-canvas' (possible exports: __esModule, default, useRive, useStateMachineInput)

from rspack.

Comments (5)

GiancarlosIO avatar GiancarlosIO commented on July 23, 2024 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? πŸ€”

from rspack.

f312213213 avatar f312213213 commented on July 23, 2024

Hi, thanks for quick responding, but I think the same error still exist, this time I'm using the @tanstack/react-query lib and the case is:

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

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 QueryClient is re-export from @tanstack/query-core actually

import './setBatchUpdatesFn';
export * from '@tanstack/query-core'; // re-export from this line
export * from './types';

I'm using "@rsbuild/core": "1.0.0-alpha.4" which depends on the latest rspack, version: "1.0.0-alpha.1".

from rspack.

f312213213 avatar f312213213 commented on July 23, 2024

Additional information: When I use "@rsbuild/core": "0.5.9", everything works fine.

from rspack.

ahabhgk avatar ahabhgk commented on July 23, 2024

@f312213213 I can't reproduce in my local, could you provide a minimal reproduce?

from rspack.

f312213213 avatar f312213213 commented on July 23, 2024

Hi @ahabhgk ,The following link is my minimal reproduce.

https://codesandbox.io/p/devbox/rsbuild-rive-app-bug-forked-mnlp5y

from rspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.