MediumHow to fix Vercel not identifying NextJS Version/Error 404 in Vercel - Syed Khizar Rayaz - Medium
Sitemap

How to fix Vercel not identifying NextJS Version/Error 404 in Vercel

--

Problem

There can be many reasons for the Vercel not detecting the NextJS version, which can result in an error 404 and build failure. The following are some common causes:

The source code is not in the repository's root folder, specifically package.json.

The Package.json is not properly configured.

Get Syed Khizar Rayaz’s stories in your inbox

Join Medium for free to get updates from this writer.

Solution

The first thing that needs to be done is to change the source code directory to the root directory of the repository; in simple terms, remove the source code containing folder if any and move the source code to the repository folder (the base folder).

Press enter or click to view image in full size
repository base folder containing source code alongside package.json

If the error persists, examine the repository name, and the name column of package.json should be the same. If there is a change, revise either the name column of package.json or the repository name.

Press enter or click to view image in full size
name of the repository and name column in the package.json is the same

--

--

Syed Khizar Rayaz
Syed Khizar Rayaz

Written by Syed Khizar Rayaz

404 error fixed dev trying to help people.