Error: Attempted to call map() from the server but map is on the client. It's not possible to invoke
Unanswered
Eric Burel posted this in #help-forum
Hi, I am hitting an issue similar to the issue described here: https://stackoverflow.com/questions/78145012/nextjs-attempted-to-call-find-from-the-server-but-find-is-on-the-client
My goal is to export an array of strings from client components, and use this array in a server component to filter relevant translation tokens before passing them to the client.
This raise this strange issue when I try to iterate over the list of tokens, it seems that the client component object is being proxied to prevent iteration over it, but this behaviour is quite surprising.
Opened an issue about it: https://github.com/vercel/next.js/issues/66604
My goal is to export an array of strings from client components, and use this array in a server component to filter relevant translation tokens before passing them to the client.
This raise this strange issue when I try to iterate over the list of tokens, it seems that the client component object is being proxied to prevent iteration over it, but this behaviour is quite surprising.
Opened an issue about it: https://github.com/vercel/next.js/issues/66604