Skip to content
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

[WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing #4747

Closed
1 task done
timneutkens opened this issue Apr 28, 2023 · 1 comment · Fixed by #4756
Closed
1 task done

[WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing #4747

timneutkens opened this issue Apr 28, 2023 · 1 comment · Fixed by #4756
Assignees

Comments

@timneutkens
Copy link
Member

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

no response

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Turbopack (--turbo)

Link to the code that reproduces this issue

no response

To Reproduce

no response

Describe the Bug

when exporting like this export type { NextResponse } then in that file next response is not working, it was working before

error during Next.js routing for /

Caused by:

  • ReferenceError: NextResponse is not defined

Debug info:

  • Execution of get_from_source failed
  • Execution of resolve_source_request failed
  • Execution of NextRouterContentSource::get failed
  • error during Next.js routing for /
  • ReferenceError: NextResponse is not defined
    [at Object.middleware [as handler] (file:///app/apps/web/.next/build/edge/chunks/[project]packages_next-intl_src_server_index.tsx_ab3591..js:84:13)]
    [at Object.adapter (file:///app/apps/web/.next/build/edge/chunks/08b5e_.pnpm_204d7e..js:1664:33)]
    [at default (file:///app/apps/web/.next/build/edge/chunks/src_middleware.ts_next-edge-bootstrap.ts_bb7e12.
    .js:20:335)]
    [at file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/web/sandbox/sandbox.js:88:30]
    [at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]
    [at async TurbopackDevServerProxy.runMiddleware (file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/next-server.js:1494:24)]
    [at async TurbopackDevServerProxy.runMiddleware (file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/dev/next-dev-server.js:827:28)]
    [at async Object.fn (file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/next-server.js:1639:42)]
    [at async Router.execute (file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/router.js:311:32)]
    [at async resolveRoute (file:///app/node_modules/.pnpm/next@13.3.1-canary.13_@babel+core@7.21.3_react-dom@18.2.0_react@18.2.0_sass@1.62.0/node_modules/next/dist/server/lib/route-resolver.js:176:9)]

Expected Behavior

it was working before

Which browser are you using? (if relevant)

no response

How are you deploying your application? (if relevant)

no response

From SyncLinear.com | WEB-969

@timneutkens timneutkens changed the title [WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing [WEB-969] [WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing Apr 28, 2023
@padmaia
Copy link
Member

padmaia commented Apr 28, 2023

linear sync duplicated

@padmaia padmaia closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@timneutkens timneutkens reopened this Apr 28, 2023
@padmaia padmaia changed the title [WEB-969] [WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing [WEB-969] since 13.3.1-canary.13 routing error in NextResponse not existing Apr 28, 2023
kdy1 added a commit to swc-project/swc that referenced this issue Apr 29, 2023
@kodiakhq kodiakhq bot closed this as completed in #4756 Apr 30, 2023
kodiakhq bot pushed a commit that referenced this issue Apr 30, 2023
### Description

 - Fix WEB-969
 - Fix #4747


### Testing Instructions

Look at CI of the next.js counterpart:
vercel/next.js#48982
@timneutkens timneutkens reopened this May 1, 2023
sokra added a commit to vercel/next.js that referenced this issue May 1, 2023
### What?

Update swc_core and `@swc/core`.

### Why?

vercel/turbo#4747 seems like a critical issue.

### How?

 - Fix WEB-969

### Turbopack changes

* vercel/turbo#4688 <!-- OJ Kwon - ci(workflow):
add appdir underscore test to subset -->
* vercel/turbo#4751 <!-- Justin Ridgewell -
Cleanup "started server on" message -->
* vercel/turbo#4756 <!-- Donny/강동윤 - chore:
Update `swc_core` to `v0.75.41` -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
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

Successfully merging a pull request may close this issue.

3 participants