vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.95k stars 26.98k forks source link

Next expermintal production standalone Error: Not implemented. at Object.getCacheForType #57205

Open bu3alwa opened 1 year ago

bu3alwa commented 1 year ago

Link to the code that reproduces this issue

https://github.com/bu3alwa/Jellyfin-Patreon-Account-Portal/tree/d8b4a1fc2f250a92af9d908ffbf8c629614c4ac3

To Reproduce

  1. Create a next standalone with server actions experimental (page must use server action)
  2. Run next build
  3. Copy standalone folder to a different location
  4. Run node server.js

Current vs. Expected behavior

Seems to have a missing function during production on experimental features.

Current: Page does not load (white page) Expected: Page should load

Verify canary release

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Education
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: 8.9.2
Relevant Packages:
  next: 13.5.6
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

App Router

Additional context

I tested 13.5.1, 13.5.5, and canary doesn't build right now for me.I am running node 18.18.0. This seems to affect only the experimental feature. Dev seems to work without any errors loading but prod seems to have an issue on standalone. Next start does not have this issue it seems like its only standalone output.

account  | Error: Not implemented.
account  |     at Object.getCacheForType (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:38524)
account  |     at /app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:51:4529
account  |     at Providers (/app/.next/server/chunks/387.js:1:1088)
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:42286)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:55760)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:52940)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  | Error: Not implemented.
account  |     at Object.getCacheForType (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:38524)
account  |     at /app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:51:4529
account  |     at Providers (/app/.next/server/chunks/387.js:1:1088)
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:42286)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:55760)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:52940)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  | Error: Not implemented.
account  |     at Object.getCacheForType (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:38524)
account  |     at /app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:51:4529
account  |     at Providers (/app/.next/server/chunks/387.js:1:1088)
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:42286)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:55760)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  |     at nP (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:52940)        
account  |     at nO (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:58995)        
account  |     at nM (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:62939)        
account  | Error: Not implemented.
account  |     at Object.getCacheForType (/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:27:38524)
account  |     at /app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:51:4529
FreyzerFault commented 1 year ago

I've also encounter this error in building process, when generating static pages.

Not using cache() method from react seems to fix it.

I can run it in dev mode without problems, but with no build I can't test a production run.

My Environment

System:
    OS: Windows 10 10.0.22635
    CPU: (12) x64 AMD Ryzen 5 3600XT 6-Core Processor
    Memory: 3.14 GB / 15.91 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.1 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 8.7.6 - ~\AppData\Local\pnpm\pnpm.EXE
  Managers:
    pip3: 23.2.1 - C:\Python311\Scripts\pip3.EXE
  Utilities:
    Git: 2.41.0.
    Curl: 8.0.1 - C:\WINDOWS\system32\curl.EXE
  IDEs:
    Android Studio: AI-223.8836.35.2231.10406996
    VSCode: 1.83.1 - C:\Users\marti\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
    Visual Studio: 17.6.33723.286 (Visual Studio Community 2022)       
  Languages:
    Java: 11.0.19
    Python: 3.11.5
  Browsers:
    Edge: Chromium (119.0.2151.12)
    Internet Explorer: 11.0.22621.1

It's a shame, I need cache() for a third party library which do some fetching to an external API witth lots of data and cache() is so usefull for that.

John9570 commented 11 months ago

also running into this, watching for fix

nicole0707 commented 9 months ago

Having the issue too

max-mayorov commented 8 months ago

Having same error too...

jakevollkommer commented 8 months ago

same error, but for me I'm using @urql/next as described in the docs here

dkildar commented 3 months ago

I'm having the same issue too. My pages cannot be rendered in SSR, but on client side it's okay.

Error: Not implemented.
    at Object.getCacheForType (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:42309)
    at ***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:107268
    at m (***/.next/server/chunks/6152.js:10:58059)
    at b (***/.next/server/chunks/6152.js:10:14955)
    at nj (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:46251)
    at nM (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47571)
    at nM (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61546)
    at nN (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
    at nB (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
    at nD (***/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:66680) {
  digest: '2525123186'
}