#react-aria error in rwsdk 0.0.84

1 messages · Page 1 of 1 (latest)

spiral python
#

I'm encountering an error while trying to implement react-aria using rwsdk 0.0.84.

The issue I have is:

error running /Users/my_user/Projects/my_project/node_modules/.vite/deps_worker/react-aria-components.js?v=6f066f86

This module cannot be imported from a Server Component module. It should only be used from a Client Component.```

The file src/app/design-system/Button.tsx has the "use client"; directive at the top. 

This means both the component and its direct dependency Button.tsx are correctly marked as Client Components.

The error message "Error: This module cannot be imported from a Server Component module. It should only be used from a Client Component." specifically implicates react-aria-components.js.
fading comet
#

@teal bridge

teal bridge
#

@fading comet I'm not sure if it's that one, I don't see any "use client" in react-aria-components

#

The message does seem to indicate it might be related though

fading comet
#

I wonder if it's something that I did 🤔

teal bridge
#

Maybe best is we try reproduce it using a small example that uses react-aria-components

#

I can try do that when I'm back on Wednesday

spiral python
#

If you find the information valuable: I ran the starter template, and the only dependency I installed was react-aria, which resulted in the same error.

fading comet
#

Very helpful, thanks!

teal bridge
spiral python
#

@teal bridge that's great, let me take a look!

weary tapir
#

Hi @teal bridge , do we also have a workaround for #429?

teal bridge
#

@weary tapir ah, that one's trickier unfortunately. No easy workarounds there in the general case. There might something we can do for specific packages though. But we'll try get this solved asap