You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run yarn && yarn dev navigate to http://localhost:3000, you should see it says Data: My bad data because res.locals is undefined in next 13.4.13+ in pages/_app
Describe the Bug
After upgrading to 13.4.13 and above we are no longer able to use data set on res.locals inside the express custom server in pages/_app.tsx
Expected Behavior
Whats expected to happen is that http://localhost:3000 renders with the page saying Data: My nice data, this works when using next version 13.4.12
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered:
skogie
changed the title
Custom data on res from express in custom server is not available in pages/
Data inside the res.locals object from express in custom server is not available in pages/
Aug 22, 2023
skogie
changed the title
Data inside the res.locals object from express in custom server is not available in pages/
Data inside the res.locals object from express in custom server is not available in pages/ after version 13.4.13+
Aug 22, 2023
+1, we have the same issue when trying to upgrade to v13.4.13. We set custom information within req in our custom server and it's not available anymore in getServerSideProps.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.17 pnpm: 8.0.0 Relevant Packages: next: 13.4.20-canary.2 eslint-config-next: 13.4.20-canary.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://github.com/skogie/test-custom-express-server-next
To Reproduce
run
yarn && yarn dev
navigate to http://localhost:3000, you should see it saysData: My bad data
because res.locals is undefined in next13.4.13+
inpages/_app
Describe the Bug
After upgrading to 13.4.13 and above we are no longer able to use data set on res.locals inside the express custom server in
pages/_app.tsx
Expected Behavior
Whats expected to happen is that http://localhost:3000 renders with the page saying
Data: My nice data
, this works when using next version13.4.12
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: