resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
12.67k stars 583 forks source link

Error: Failed to find Server Action "55a9c3606b93e6d9bf0c4e99c71bbe33e93e20bd". This request might be from an older or newer deployment. Original error: Cannot read properties of undefined (reading 'workers') #1309

Closed MrDalo closed 3 months ago

MrDalo commented 3 months ago

Describe the Bug

Hi! I am running my react-email application on version react-email@2.1.0-canary.1 and everytime I change something and same in my email.tsx file, I get this error into my console.

Error: Failed to find Server Action "55a9c3606b93e6d9bf0c4e99c71bbe33e93e20bd". This request might be from an older or newer deployment. Original error: Cannot read properties of undefined (reading 'workers') at t3 (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:1693) at C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:38:7079 at AsyncLocalStorage.run (node:async_hooks:346:14) at t4 (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:38:6387) at rk (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:25940) at C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:28648 at AsyncLocalStorage.run (node:async_hooks:346:14) at Object.wrap (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:36:16172) at C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:28536 at AsyncLocalStorage.run (node:async_hooks:346:14) at Object.wrap (C:\Users\dadok\Desktop\Doma IT\API project\data-app\nodemodules\next\dist\compiled\next-server\app-page.runtime.dev.js:36:15420) at r (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:28463) at rW.render (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:32559) at doRender (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\server\base-server.js:1394:44) at cacheEntry.responseCache.get.routeKind (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\server\base-server.js:1543:46)
at ResponseCache.get (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\server\response-cache\index.js:49:26) at DevServer.renderToResponseWithComponentsImpl (C:\Users\dadok\Desktop\Doma IT\API project\data-app\node_modules\next\dist\server\base-server.js:1463:53)

Do you know how to fix it please?

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

.

To Reproduce

.

Expected Behavior

.

What's your node version? (if relevant)

20.9.0

gabrielmfern commented 3 months ago

Try re-running the command.

MrDalo commented 3 months ago

Try re-running the command.

I tried restart react-email server, re-install npm packages but still when I make any change inside email, I will get the same error

gabrielmfern commented 3 months ago

@MrDalo Also try re-opening the browser tab

gabrielmfern commented 3 months ago

This is probably because the JavaScript in the tab you have is older than the one from the package new version. Just re-opening the tab should do.

I also hit this a couple of times when switching between a lot of versions

WillsB3 commented 4 weeks ago

I'm not sure this was a one off thing. I'm also seeing a similar error, and I have tried rerunning npm run dev and refreshing the browser tab, but when saving a file after making changes the error still occurs.

Error: Failed to find Server Action "4f0fe0a4749fca4500b63cdfba78cca34a3606e3". This request might be from an older or newer deployment. Original error: Cannot read properties of undefined (reading 'workers')
    at t3 (/Users/wills/Development/Farewill/zookeeper/react-email/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:1693)
    at /Users/wills/Development/Farewill/zookeeper/react-email/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:38:7079
    at AsyncLocalStorage.run (node:async_hooks:346:14)
    at t4 (/Users/wills/Development/Farewill/zookeeper/react-email/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:38:6387)
    at rk (/Users/wills/Development/Farewill/zookeeper/react-email/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:25940)
    at /Users/wills/Development/Farewill/zookeeper/react-email/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:28648
    at AsyncLocalStorage.run (node:async_hooks:346:14)
…

It doesn't seem to affect the operation of the development server but it's a bit strange.

Package versions:

"@react-email/components": "0.0.17-canary.1"
"react-email": "2.1.2-canary.0",