Skip to content

Commit 86652a7

Browse files
author
Louis DeScioli
committed
Print full publish dir path when build not found
1 parent 4448404 commit 86652a7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/helpers/verification.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ export const checkNextSiteHasBuilt = ({
6868
: `In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config.`
6969

7070
return failBuild(outdent`
71-
The directory "${path.relative(
72-
process.cwd(),
73-
publish,
74-
)}" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
71+
The directory "${publish}" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
7572
${outWarning}
7673
If you are using "next export" then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to "true".
7774
`)
@@ -93,7 +90,7 @@ export const checkForRootPublish = ({
9390
}): void | never => {
9491
if (path.resolve(publish) === path.resolve('.')) {
9592
failBuild(outdent`
96-
Your publish directory is pointing to the base directory of your site. This is not supported for Next.js sites, and is probably a mistake.
93+
Your publish directory is pointing to the base directory of your site. This is not supported for Next.js sites, and is probably a mistake.
9794
In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config, or the Next site is in a subdirectory.
9895
`)
9996
}

0 commit comments

Comments
 (0)