question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in vercel deploy: TypeError: Cannot read properties of undefined (reading 'v2_meta')

See original GitHub issue

What version of Remix are you using?

1.6.7

Steps to Reproduce

clone repository by ssh: git clone git@github.com:Lucas-Eduardo-Goncalves/pac.app.git then add this repository to vercel, and try.

Expected Behavior

My site should work normally. On localhost I can’t find it works normally.

Actual Behavior

I find the error message: TypeError: Cannot read properties of undefined (reading ‘v2_meta’)

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chaancecommented, Dec 5, 2022
1reaction
ThanhPhat1080commented, Dec 4, 2022

Seem you are missing edit the remix config while you want to deploy to Vercel. In remix.config.js

/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
  serverBuildTarget: "vercel",
  // When running locally in development mode, we use the built in remix
  // server. This does not understand the vercel lambda module format,
  // so we default back to the standard build output.
  server: process.env.NODE_ENV === "development" ? undefined : "./server.js",
  ignoredRouteFiles: ["**/.*"],
  // appDirectory: "app",
  // assetsBuildDirectory: "public/build",
  // serverBuildPath: "api/index.js",
  // publicPath: "/build/",
};

Create new server.js file at your root folder (the same level of remix.config.js)

import { createRequestHandler } from "@remix-run/vercel";
import * as build from "@remix-run/dev/server-build";

export default createRequestHandler({ build, mode: process.env.NODE_ENV });

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vercel deployment fails "Cannot read properties of undefined ...
I'm building a ReactJS/NextJS website and I was going to deploy it online using Vercel. During the build I have some warnings as...
Read more >
typeerror: cannot read properties of undefined ... - You.com
On my machine the application is working correctly but when I deploy it to vercel it shows this error. Below is my movie.js...
Read more >
Errors – Vercel Docs
A list of errors provided by Vercel CLI or the REST API, with details on how they occur and how to resolve them....
Read more >
Getting multiple TypeErrors when deploying using Vercel.
I'm trying to deploy my webapp for the first time and I'm getting this error on Vercel: TypeError: Cannot read property 'split' of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found