-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
deploy failed on vercel #4303
Comments
@siddhsuresh Can you take a look, thx. |
remove |
@gengjiawen can you be a bit more specific? Thanks! We are also having this problem... |
patch node modules like this (I am using pnpm) diff --git a/dist/chunks/auth-plugin.cjs b/dist/chunks/auth-plugin.cjs
index beef77a9f480f095381f176b0da5a3c77c4ee25e..dff1216e3f4c6cacc2ba0e05d12254e56679e471 100644
--- a/dist/chunks/auth-plugin.cjs
+++ b/dist/chunks/auth-plugin.cjs
@@ -162,7 +162,7 @@ function getSession(req2, res2, appDir = false) {
function getBlitzContext() {
return __async$1(this, null, function* () {
try {
- const { headers, cookies } = eval("require('next/headers')");
+ const { headers, cookies } = require('next/headers');
const req = new http.IncomingMessage(new net.Socket());
req.headers = Object.fromEntries(headers());
const csrfToken = cookies().get(index.COOKIE_CSRF_TOKEN());
@@ -201,7 +201,7 @@ function useAuthenticatedBlitzContext(_0) {
const ctx = yield getBlitzContext();
const userId = ctx.session.userId;
try {
- const { redirect } = eval("require('next/navigation')");
+ const { redirect } = require('next/navigation');
if (userId) {
debug("[useAuthenticatedBlitzContext] User is authenticated");
if (redirectAuthenticatedTo) { |
thanks for the issue @gengjiawen! I will take a look today. Does this happen locally for you? Since I am no longer able to replicate this after the latest fix. |
If you refer to the deploy issue, The deploy issue only happens on nextjs. My local yarn start works. |
okay thanks for the info. will keep that in mind and debug |
probably related to #4309. Please fix it fast |
This comment was marked as outdated.
This comment was marked as outdated.
@gengjiawen where is |
import from blitz-server will result in build error.
adding a new issue: #4310 |
since this has been 3 weeks, I have created #4311 to fix this issue. |
Hey folks, we have investigated, can reproduce, but so far are unable to understand what is happening on Vercel. Are any of you able to reach out to Vercel support and enlist their help? |
Yes I am in contact, and got them to investigate, they were quick to blame the 3rd party dependency, but I pressed them after investigating the source code that the way you import and use debug is not wrong and it's their problem, so it seems they will look into it, I suggest you also reach out because you have more technical knowledge to explain than me |
Got my answer today
|
Repro: https://github.com/gengjiawen/blitzjs-demo
Image:
Originally posted by @siddhsuresh in #4299 (comment)
The text was updated successfully, but these errors were encountered: