@vercel/next 4.15.9 → 4.15.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +50 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2265,9 +2265,9 @@ var require_graceful_fs = __commonJS({
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
var fs$readdir = fs6.readdir;
|
|
2268
|
-
fs6.readdir =
|
|
2268
|
+
fs6.readdir = readdir2;
|
|
2269
2269
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
2270
|
-
function
|
|
2270
|
+
function readdir2(path6, options, cb) {
|
|
2271
2271
|
if (typeof options === "function")
|
|
2272
2272
|
cb = options, options = null;
|
|
2273
2273
|
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
|
|
@@ -11334,7 +11334,13 @@ async function getRoutesManifest(entryPath, outputDirectory, nextVersion) {
|
|
|
11334
11334
|
const hasRoutesManifest = await import_fs_extra3.default.access(pathRoutesManifest).then(() => true).catch(() => false);
|
|
11335
11335
|
if (shouldHaveManifest && !hasRoutesManifest) {
|
|
11336
11336
|
throw new import_build_utils.NowBuildError({
|
|
11337
|
-
message: `The file "${pathRoutesManifest}" couldn't be found. This is
|
|
11337
|
+
message: `The file "${pathRoutesManifest}" couldn't be found. This is usually caused by one of the following:
|
|
11338
|
+
|
|
11339
|
+
1. The "Output Directory" setting in your project is misconfigured. Ensure it matches your Next.js "distDir" configuration (defaults to ".next").
|
|
11340
|
+
|
|
11341
|
+
2. If using Turborepo, ensure your task outputs include the Next.js build directory. Add ".next/**" (or your custom distDir) to the "outputs" array in turbo.json for the build task.
|
|
11342
|
+
|
|
11343
|
+
3. The build command did not complete successfully. Check the build logs above for errors.`,
|
|
11338
11344
|
link: "https://err.sh/vercel/vercel/now-next-routes-manifest",
|
|
11339
11345
|
code: "NEXT_NO_ROUTES_MANIFEST"
|
|
11340
11346
|
});
|
|
@@ -12224,9 +12230,11 @@ async function getPageLambdaGroups({
|
|
|
12224
12230
|
),
|
|
12225
12231
|
pageExtensions
|
|
12226
12232
|
});
|
|
12233
|
+
const isAppRouterRoute = sourceFile.endsWith("/route.js") || sourceFile.endsWith("/route.ts");
|
|
12234
|
+
const configRelativePath = isAppRouterRoute ? "../config.json" : "./config.json";
|
|
12227
12235
|
const config2 = JSON.parse(
|
|
12228
12236
|
await import_fs_extra3.default.readFile(
|
|
12229
|
-
import_path3.default.join(entryPath, import_path3.default.dirname(sourceFile),
|
|
12237
|
+
import_path3.default.join(entryPath, import_path3.default.dirname(sourceFile), configRelativePath),
|
|
12230
12238
|
"utf8"
|
|
12231
12239
|
).catch(() => "{}")
|
|
12232
12240
|
);
|
|
@@ -16694,7 +16702,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
16694
16702
|
let buildOutputVersion;
|
|
16695
16703
|
try {
|
|
16696
16704
|
const data = await (0, import_fs_extra6.readJSON)(
|
|
16697
|
-
import_path6.default.join(outputDirectory, "output/config.json")
|
|
16705
|
+
import_path6.default.join(entryPath, outputDirectory, "output/config.json")
|
|
16698
16706
|
);
|
|
16699
16707
|
buildOutputVersion = data.version;
|
|
16700
16708
|
} catch (_) {
|
|
@@ -16705,6 +16713,35 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
16705
16713
|
buildOutputVersion
|
|
16706
16714
|
};
|
|
16707
16715
|
}
|
|
16716
|
+
const absoluteOutputDirectory = import_path6.default.join(entryPath, outputDirectory);
|
|
16717
|
+
const outputDirExists = await (0, import_fs_extra6.pathExists)(absoluteOutputDirectory);
|
|
16718
|
+
if (!outputDirExists) {
|
|
16719
|
+
throw new import_build_utils3.NowBuildError({
|
|
16720
|
+
code: "NEXT_OUTPUT_DIR_MISSING",
|
|
16721
|
+
message: `The Next.js output directory "${outputDirectory}" was not found at "${absoluteOutputDirectory}". This is usually caused by one of the following:
|
|
16722
|
+
|
|
16723
|
+
1. The "Output Directory" setting in your project is misconfigured. Check your project settings and ensure the output directory matches your Next.js configuration.
|
|
16724
|
+
|
|
16725
|
+
2. If using Turborepo, ensure your task outputs include the Next.js build directory. Add "${outputDirectory}/**" to the "outputs" array in your turbo.json for the build task.
|
|
16726
|
+
|
|
16727
|
+
3. The build command did not complete successfully. Check the build logs above for errors.`,
|
|
16728
|
+
link: "https://err.sh/vercel/vercel/now-next-routes-manifest"
|
|
16729
|
+
});
|
|
16730
|
+
}
|
|
16731
|
+
const outputDirContents = await (0, import_fs_extra6.readdir)(absoluteOutputDirectory);
|
|
16732
|
+
if (outputDirContents.length === 0) {
|
|
16733
|
+
throw new import_build_utils3.NowBuildError({
|
|
16734
|
+
code: "NEXT_OUTPUT_DIR_EMPTY",
|
|
16735
|
+
message: `The Next.js output directory "${outputDirectory}" exists but is empty. This is usually caused by one of the following:
|
|
16736
|
+
|
|
16737
|
+
1. If using Turborepo, ensure your task outputs include the Next.js build directory. Add "${outputDirectory}/**" to the "outputs" array in your turbo.json for the build task.
|
|
16738
|
+
|
|
16739
|
+
2. The build command did not generate any output. Check the build logs above for errors.
|
|
16740
|
+
|
|
16741
|
+
3. A previous build step may have cleared the output directory.`,
|
|
16742
|
+
link: "https://err.sh/vercel/vercel/now-next-routes-manifest"
|
|
16743
|
+
});
|
|
16744
|
+
}
|
|
16708
16745
|
let appMountPrefixNoTrailingSlash = import_path6.default.posix.join("/", entryDirectory).replace(/\/+$/, "");
|
|
16709
16746
|
const requiredServerFilesManifest = isServerMode ? await getRequiredServerFilesManifest(entryPath, outputDirectory) : false;
|
|
16710
16747
|
isServerMode = Boolean(requiredServerFilesManifest);
|
|
@@ -16760,6 +16797,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
16760
16797
|
let hasPages404 = false;
|
|
16761
16798
|
let buildId = "";
|
|
16762
16799
|
let escapedBuildId = "";
|
|
16800
|
+
let deploymentId;
|
|
16763
16801
|
if (isLegacy || isSharedLambdas || isServerMode) {
|
|
16764
16802
|
try {
|
|
16765
16803
|
buildId = await (0, import_fs_extra6.readFile)(
|
|
@@ -16774,6 +16812,9 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
16774
16812
|
});
|
|
16775
16813
|
}
|
|
16776
16814
|
}
|
|
16815
|
+
if (routesManifest?.deploymentId) {
|
|
16816
|
+
deploymentId = routesManifest.deploymentId;
|
|
16817
|
+
}
|
|
16777
16818
|
if (routesManifest) {
|
|
16778
16819
|
switch (routesManifest.version) {
|
|
16779
16820
|
case 1:
|
|
@@ -17076,7 +17117,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
17076
17117
|
}
|
|
17077
17118
|
] : []
|
|
17078
17119
|
],
|
|
17079
|
-
framework: { version: nextVersion }
|
|
17120
|
+
framework: { version: nextVersion },
|
|
17121
|
+
...deploymentId && { deploymentId }
|
|
17080
17122
|
};
|
|
17081
17123
|
}
|
|
17082
17124
|
if (isLegacy) {
|
|
@@ -18438,7 +18480,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
18438
18480
|
]
|
|
18439
18481
|
]
|
|
18440
18482
|
],
|
|
18441
|
-
framework: { version: nextVersion }
|
|
18483
|
+
framework: { version: nextVersion },
|
|
18484
|
+
...deploymentId && { deploymentId }
|
|
18442
18485
|
};
|
|
18443
18486
|
};
|
|
18444
18487
|
var diagnostics = async ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"test-listen": "1.1.0",
|
|
53
53
|
"text-table": "0.2.0",
|
|
54
54
|
"webpack-sources": "3.2.3",
|
|
55
|
-
"@vercel/build-utils": "13.2.
|
|
56
|
-
"@vercel/routing-utils": "5.3.
|
|
55
|
+
"@vercel/build-utils": "13.2.5",
|
|
56
|
+
"@vercel/routing-utils": "5.3.2"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "node build.mjs",
|