Skip to content

@parcel/rsc server action failed #10148

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

Open
himself65 opened this issue May 2, 2025 · 1 comment
Open

@parcel/rsc server action failed #10148

himself65 opened this issue May 2, 2025 · 1 comment

Comments

@himself65
Copy link

I just follow https://parceljs.org/recipes/rsc/#quick-start

TypeError: Failed to fetch
fetchRSC
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@parcel/rsc/src/client.tsx:58:19
  55 | 
  56 | export async function fetchRSC<T>(url: string | URL | Request, options?: 
  57 |   const temporaryReferences = createTemporaryReferenceSet();
> 58 |   const response = fetch(url, {
>    |                    ^
  59 |     ...options,
  60 |     headers: {
  61 |       Accept: 'text/x-component',
View compiled
async callServer
src/client.tsx:10:25
   7 |   // Setup a callback to perform server actions.
   8 |   // This sends a POST request to the server, and updates the page with t
   9 |   async callServer(id, args) {
> 10 | t} = await fetchRSC<{root: ReactNode, result: any}>(location.pathname, {
>    |      ^
  11 |       method: 'POST',
  12 |       headers: {
  13 |         'rsc-action-id': id,
View compiled

server side

@parcel/reporter-dev-server: Invalid server action: brni1#action

  Error: Invalid server action: brni1#action
      at resolveServerReference 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js:20:33)
      at exports.loadServerAction 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js:3873:23)
      at callAction 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@parcel/rsc/src/server.tsx:114:39)
      at callAction 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@parcel/rsc/src/node.tsx:71:23)
      at <anonymous> (/Users/himself65/Code/my-rsc-app/src/server.tsx:17:33)
      at Layer.handle [as handle_request] 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/layer.js:95:5)
      at next 
  (/Users/himself65/Code/my-rsc-app/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/route.js:149:13)
      at Route.dispatch 
@devongovett
Copy link
Member

Probably pnpm is installing multiple instances of react-server-dom-parcel...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants