create project
This commit is contained in:
18
kitabcitab/node_modules/next/dist/lib/format-server-error.js
generated
vendored
Normal file
18
kitabcitab/node_modules/next/dist/lib/format-server-error.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.formatServerError = formatServerError;
|
||||
function formatServerError(error) {
|
||||
if (error.message.includes("createContext is not a function")) {
|
||||
const message = 'createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component';
|
||||
error.message = message;
|
||||
if (error.stack) {
|
||||
const lines = error.stack.split("\n");
|
||||
lines[0] = message;
|
||||
error.stack = lines.join("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=format-server-error.js.map
|
||||
Reference in New Issue
Block a user