NextJs TypeError [关闭]

h4cxqtbf  于 2023-10-18  发布在  其他
关注(0)|答案(3)|浏览(113)

已关闭,此问题需要更focused。它目前不接受回答。
**想改善这个问题吗?**更新问题,使其只关注editing this post的一个问题。

13小时前关闭
Improve this question

TypeError: responseHeaders.getSetCookie is not a function
    at new ResponseCookies (webpack-internal:///(app-metadata-route)/./node_modules/next/dist/compiled/@edge-runtime/cookies/index.js:213:47)
    at new NextResponse (webpack-internal:///(app-metadata-route)/./node_modules/next/dist/server/web/spec-extension/response.js:40:22)
    at GET (webpack-internal:///(app-metadata-route)/./node_modules/next/dist/build/webpack/loaders/next-metadata-route-loader.js?page=%2Ffavicon.ico%2Froute&isDynamic=0!./src/app/favicon.ico?__next_metadata_route__:15:10)
    at G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:62505
    at G:\groove-hub\node_modules\next\dist\server\lib\trace\tracer.js:121:36
    at NoopContextManager.with (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NoopTracer.startActiveSpan (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18086)
    at ProxyTracer.startActiveSpan (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18847)
    at G:\groove-hub\node_modules\next\dist\server\lib\trace\tracer.js:110:107
    at NoopContextManager.with (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (G:\groove-hub\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NextTracerImpl.trace (G:\groove-hub\node_modules\next\dist\server\lib\trace\tracer.js:110:32)
    at G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:56147
    at AsyncLocalStorage.run (node:async_hooks:330:14)
    at Object.wrap (G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:37057)
    at G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:53934
    at AsyncLocalStorage.run (node:async_hooks:330:14)
    at Object.wrap (G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:36635)
    at G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:53896
    at AsyncLocalStorage.run (node:async_hooks:330:14)
    at eD.execute (G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:53870)
    at eD.handle (G:\groove-hub\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:63748)
    at doRender (G:\groove-hub\node_modules\next\dist\server\base-server.js:1217:56)
    at cacheEntry.responseCache.get.incrementalCache.incrementalCache (G:\groove-hub\node_modules\next\dist\server\base-server.js:1446:34)
    at ResponseCache.get (G:\groove-hub\node_modules\next\dist\server\response-cache\index.js:53:26)
    at DevServer.renderToResponseWithComponentsImpl (G:\groove-hub\node_modules\next\dist\server\base-server.js:1361:53)
    at G:\groove-hub\node_modules\next\dist\server\base-server.js:903:121
    at NextTracerImpl.trace (G:\groove-hub\node_modules\next\dist\server\lib\trace\tracer.js:94:20)
    at DevServer.renderToResponseWithComponents (G:\groove-hub\node_modules\next\dist\server\base-server.js:903:41)
    at DevServer.renderPageComponent (G:\groove-hub\node_modules\next\dist\server\base-server.js:1600:35)
    at async DevServer.renderToResponseImpl (G:\groove-hub\node_modules\next\dist\server\base-server.js:1638:32)
    at async DevServer.pipeImpl (G:\groove-hub\node_modules\next\dist\server\base-server.js:826:25)
    at async DevServer.handleCatchallRenderRequest (G:\groove-hub\node_modules\next\dist\server\next-server.js:623:13)
    at async DevServer.handleRequestImpl (G:\groove-hub\node_modules\next\dist\server\base-server.js:728:17)

我刚刚初始化了一个nextjs typescript应用程序,但发生了未知错误,即使我的应用程序是空的

lymgl2op

lymgl2op1#

我在Node 18.12.1和下一个==13.5.5中遇到了同样的错误。它在下一个==13.5.4或节点18.18.2中消失了。
因此,更新您的Node版本或下一个版本将解决此问题。

a5g8bdjr

a5g8bdjr2#

我得到了这个错误,我所做的就是升级到node 18.18.2并删除node_modules文件夹,packaje.json文件并运行npm run install,错误消失了。

w46czmvw

w46czmvw3#

我得到了同样的错误,使用下一个==13.5.5和节点v19.1.0。返回到下一个==13.5.4解决了这个问题。感谢@kaoru的建议

相关问题