/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
shared
/
lib
/
/opt/canhelp/node_modules/next/dist/shared/lib
mkdir
upload
Name
Size
Mode
Actions
errors/
-
0755
rm
i18n/
-
0755
rm
isomorphic/
-
0755
rm
lazy-dynamic/
-
0755
rm
page-path/
-
0755
rm
router/
-
0755
rm
segment-cache/
-
0755
rm
turbopack/
-
0755
rm
utils/
-
0755
rm
amp-context.shared-runtime.d.ts
85
0644
edit
dl
rm
amp-context.shared-runtime.js
592
0644
edit
dl
rm
amp-context.shared-runtime.js.map
581
0644
edit
dl
rm
amp-mode.d.ts
191
0644
edit
dl
rm
amp-mode.js
419
0644
edit
dl
rm
amp-mode.js.map
486
0644
edit
dl
rm
amp.d.ts
43
0644
edit
dl
rm
amp.js
1026
0644
edit
dl
rm
amp.js.map
608
0644
edit
dl
rm
app-dynamic.d.ts
875
0644
edit
dl
rm
app-dynamic.js
1269
0644
edit
dl
rm
app-dynamic.js.map
1888
0644
edit
dl
rm
app-router-context.shared-runtime.d.ts
5103
0644
edit
dl
rm
app-router-context.shared-runtime.js
1686
0644
edit
dl
rm
app-router-context.shared-runtime.js.map
6339
0644
edit
dl
rm
bloom-filter.d.ts
598
0644
edit
dl
rm
bloom-filter.js
2965
0644
edit
dl
rm
bloom-filter.js.map
5508
0644
edit
dl
rm
canary-only.d.ts
170
0644
edit
dl
rm
canary-only.js
1282
0644
edit
dl
rm
canary-only.js.map
1466
0644
edit
dl
rm
constants.d.ts
5988
0644
edit
dl
rm
constants.js
14934
0644
edit
dl
rm
constants.js.map
12299
0644
edit
dl
rm
deep-freeze.d.ts
512
0644
edit
dl
rm
deep-freeze.js
868
0644
edit
dl
rm
deep-freeze.js.map
1760
0644
edit
dl
rm
deep-readonly.d.ts
389
0644
edit
dl
rm
deep-readonly.js
348
0644
edit
dl
rm
deep-readonly.js.map
565
0644
edit
dl
rm
dset.d.ts
117
0644
edit
dl
rm
dset.js
1914
0644
edit
dl
rm
dset.js.map
2570
0644
edit
dl
rm
dynamic.d.ts
1711
0644
edit
dl
rm
dynamic.js
5413
0644
edit
dl
rm
dynamic.js.map
7525
0644
edit
dl
rm
encode-uri-path.d.ts
61
0644
edit
dl
rm
encode-uri-path.js
362
0644
edit
dl
rm
encode-uri-path.js.map
469
0644
edit
dl
rm
error-source.d.ts
231
0644
edit
dl
rm
error-source.js
858
0644
edit
dl
rm
error-source.js.map
1030
0644
edit
dl
rm
escape-regexp.d.ts
65
0644
edit
dl
rm
escape-regexp.js
694
0644
edit
dl
rm
escape-regexp.js.map
852
0644
edit
dl
rm
fnv1a.d.ts
335
0644
edit
dl
rm
fnv1a.js
2770
0644
edit
dl
rm
fnv1a.js.map
4089
0644
edit
dl
rm
format-webpack-messages.d.ts
82
0644
edit
dl
rm
format-webpack-messages.js
8498
0644
edit
dl
rm
format-webpack-messages.js.map
12994
0644
edit
dl
rm
get-hostname.d.ts
454
0644
edit
dl
rm
get-hostname.js
679
0644
edit
dl
rm
get-hostname.js.map
1382
0644
edit
dl
rm
get-img-props.d.ts
3354
0644
edit
dl
rm
get-img-props.js
25201
0644
edit
dl
rm
get-img-props.js.map
37862
0644
edit
dl
rm
get-rspack.d.ts
100
0644
edit
dl
rm
get-rspack.js
2585
0644
edit
dl
rm
get-rspack.js.map
2797
0644
edit
dl
rm
get-webpack-bundler.d.ts
264
0644
edit
dl
rm
get-webpack-bundler.js
632
0644
edit
dl
rm
get-webpack-bundler.js.map
725
0644
edit
dl
rm
hash.d.ts
109
0644
edit
dl
rm
hash.js
1326
0644
edit
dl
rm
hash.js.map
1526
0644
edit
dl
rm
head-manager-context.shared-runtime.d.ts
288
0644
edit
dl
rm
head-manager-context.shared-runtime.js
616
0644
edit
dl
rm
head-manager-context.shared-runtime.js.map
863
0644
edit
dl
rm
head.d.ts
446
0644
edit
dl
rm
head.js
7006
0644
edit
dl
rm
head.js.map
9606
0644
edit
dl
rm
hooks-client-context.shared-runtime.d.ts
308
0644
edit
dl
rm
hooks-client-context.shared-runtime.js
1108
0644
edit
dl
rm
hooks-client-context.shared-runtime.js.map
1145
0644
edit
dl
rm
html-context.shared-runtime.d.ts
1889
0644
edit
dl
rm
html-context.shared-runtime.js
1149
0644
edit
dl
rm
html-context.shared-runtime.js.map
2787
0644
edit
dl
rm
image-blur-svg.d.ts
370
0644
edit
dl
rm
image-blur-svg.js
1495
0644
edit
dl
rm
image-blur-svg.js.map
2122
0644
edit
dl
rm
image-config-context.shared-runtime.d.ts
163
0644
edit
dl
rm
image-config-context.shared-runtime.js
693
0644
edit
dl
rm
image-config-context.shared-runtime.js.map
766
0644
edit
dl
rm
image-config.d.ts
4303
0644
edit
dl
rm
image-config.js
1428
0644
edit
dl
rm
image-config.js.map
5941
0644
edit
dl
rm
image-external.d.ts
742
0644
edit
dl
rm
image-external.js
1485
0644
edit
dl
rm
image-external.js.map
2176
0644
edit
dl
rm
image-loader.d.ts
271
0644
edit
dl
rm
image-loader.js
5071
0644
edit
dl
rm
image-loader.js.map
6760
0644
edit
dl
rm
invariant-error.d.ts
112
0644
edit
dl
rm
invariant-error.js
501
0644
edit
dl
rm
invariant-error.js.map
682
0644
edit
dl
rm
is-internal.d.ts
355
0644
edit
dl
rm
is-internal.js
1298
0644
edit
dl
rm
is-internal.js.map
1297
0644
edit
dl
rm
is-plain-object.d.ts
125
0644
edit
dl
rm
is-plain-object.js
1180
0644
edit
dl
rm
is-plain-object.js.map
1250
0644
edit
dl
rm
is-thenable.d.ts
233
0644
edit
dl
rm
is-thenable.js
537
0644
edit
dl
rm
is-thenable.js.map
679
0644
edit
dl
rm
loadable-context.shared-runtime.d.ts
156
0644
edit
dl
rm
loadable-context.shared-runtime.js
613
0644
edit
dl
rm
loadable-context.shared-runtime.js.map
652
0644
edit
dl
rm
loadable.shared-runtime.d.ts
1543
0644
edit
dl
rm
loadable.shared-runtime.js
8458
0644
edit
dl
rm
loadable.shared-runtime.js.map
13840
0644
edit
dl
rm
magic-identifier.d.ts
128
0644
edit
dl
rm
magic-identifier.js
3654
0644
edit
dl
rm
magic-identifier.js.map
4146
0644
edit
dl
rm
match-local-pattern.d.ts
253
0644
edit
dl
rm
match-local-pattern.js
1301
0644
edit
dl
rm
match-local-pattern.js.map
1696
0644
edit
dl
rm
match-remote-pattern.d.ts
268
0644
edit
dl
rm
match-remote-pattern.js
1931
0644
edit
dl
rm
match-remote-pattern.js.map
2723
0644
edit
dl
rm
mitt.d.ts
263
0644
edit
dl
rm
mitt.js
2247
0644
edit
dl
rm
mitt.js.map
3014
0644
edit
dl
rm
modern-browserslist-target.d.ts
199
0644
edit
dl
rm
modern-browserslist-target.js
652
0644
edit
dl
rm
modern-browserslist-target.js.map
893
0644
edit
dl
rm
no-fallback-error.external.d.ts
74
0644
edit
dl
rm
no-fallback-error.external.js
408
0644
edit
dl
rm
no-fallback-error.external.js.map
426
0644
edit
dl
rm
normalized-asset-prefix.d.ts
88
0644
edit
dl
rm
normalized-asset-prefix.js
961
0644
edit
dl
rm
normalized-asset-prefix.js.map
1314
0644
edit
dl
rm
promise-with-resolvers.d.ts
82
0644
edit
dl
rm
promise-with-resolvers.js
606
0644
edit
dl
rm
promise-with-resolvers.js.map
779
0644
edit
dl
rm
router-context.shared-runtime.d.ts
148
0644
edit
dl
rm
router-context.shared-runtime.js
587
0644
edit
dl
rm
router-context.shared-runtime.js.map
622
0644
edit
dl
rm
runtime-config.external.d.ts
293
0644
edit
dl
rm
runtime-config.external.js
722
0644
edit
dl
rm
runtime-config.external.js.map
672
0644
edit
dl
rm
segment.d.ts
504
0644
edit
dl
rm
segment.js
1562
0644
edit
dl
rm
segment.js.map
1733
0644
edit
dl
rm
server-inserted-html.shared-runtime.d.ts
288
0644
edit
dl
rm
server-inserted-html.shared-runtime.js
1171
0644
edit
dl
rm
server-inserted-html.shared-runtime.js.map
1347
0644
edit
dl
rm
server-reference-info.d.ts
1146
0644
edit
dl
rm
server-reference-info.js
1601
0644
edit
dl
rm
server-reference-info.js.map
3342
0644
edit
dl
rm
side-effect.d.ts
452
0644
edit
dl
rm
side-effect.js
2749
0644
edit
dl
rm
side-effect.js.map
3947
0644
edit
dl
rm
styled-jsx.d.ts
43
0644
edit
dl
rm
styled-jsx.js
99
0644
edit
dl
rm
styled-jsx.js.map
231
0644
edit
dl
rm
utils.d.ts
9201
0644
edit
dl
rm
utils.js
6289
0644
edit
dl
rm
utils.js.map
16073
0644
edit
dl
rm
zod.d.ts
381
0644
edit
dl
rm
zod.js
3359
0644
edit
dl
rm
zod.js.map
4507
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/shared/lib/format-webpack-messages.js
(8498B)
/** MIT License Copyright (c) 2015-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return formatWebpackMessages; } }); const _interop_require_default = require("@swc/helpers/_/_interop_require_default"); const _stripansi = /*#__PURE__*/ _interop_require_default._(require("next/dist/compiled/strip-ansi")); // This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js // It's been edited to remove chalk and CRA-specific logic const friendlySyntaxErrorLabel = 'Syntax error:'; const WEBPACK_BREAKING_CHANGE_POLYFILLS = '\n\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'; function isLikelyASyntaxError(message) { return (0, _stripansi.default)(message).includes(friendlySyntaxErrorLabel); } let hadMissingSassError = false; // Cleans up webpack error messages. function formatMessage(message, verbose, importTraceNote) { // TODO: Replace this once webpack 5 is stable if (typeof message === 'object' && message.message) { const filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName)); let body = message.message; const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS); if (breakingChangeIndex >= 0) { body = body.slice(0, breakingChangeIndex); } message = (message.moduleName ? (0, _stripansi.default)(message.moduleName) + '\n' : '') + (message.file ? (0, _stripansi.default)(message.file) + '\n' : '') + body + (message.details && verbose ? '\n' + message.details : '') + (filteredModuleTrace && filteredModuleTrace.length ? (importTraceNote || '\n\nImport trace for requested module:') + filteredModuleTrace.map((trace)=>"\n" + trace.moduleName).join('') : '') + (message.stack && verbose ? '\n' + message.stack : ''); } let lines = message.split('\n'); // Strip Webpack-added headers off errors/warnings // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js lines = lines.filter((line)=>!/Module [A-z ]+\(from/.test(line)); // Transform parsing error into syntax error // TODO: move this to our ESLint formatter? lines = lines.map((line)=>{ const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(line); if (!parsingError) { return line; } const [, errorLine, errorColumn, errorMessage] = parsingError; return friendlySyntaxErrorLabel + " " + errorMessage + " (" + errorLine + ":" + errorColumn + ")"; }); message = lines.join('\n'); // Smoosh syntax errors (commonly found in CSS) message = message.replace(/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, "" + friendlySyntaxErrorLabel + " $3 ($1:$2)\n"); // Clean up export errors message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, "Attempted import error: '$1' is not exported from '$2'."); message = message.replace(/^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, "Attempted import error: '$2' does not contain a default export (imported as '$1')."); message = message.replace(/^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, "Attempted import error: '$1' is not exported from '$3' (imported as '$2')."); lines = message.split('\n'); // Remove leading newline if (lines.length > 2 && lines[1].trim() === '') { lines.splice(1, 1); } // Cleans up verbose "module not found" messages for files and packages. if (lines[1] && lines[1].startsWith('Module not found: ')) { lines = [ lines[0], lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'), ...lines.slice(2) ]; } // Add helpful message for users trying to use Sass for the first time if (lines[1] && lines[1].match(/Cannot find module.+sass/)) { // ./file.module.scss (<<loader info>>) => ./file.module.scss const firstLine = lines[0].split('!'); lines[0] = firstLine[firstLine.length - 1]; lines[1] = "To use Next.js' built-in Sass support, you first need to install `sass`.\n"; lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\n'; lines[1] += '\nLearn more: https://nextjs.org/docs/messages/install-sass'; // dispose of unhelpful stack trace lines = lines.slice(0, 2); hadMissingSassError = true; } else if (hadMissingSassError && message.match(/(sass-loader|resolve-url-loader: CSS error)/)) { // dispose of unhelpful stack trace following missing sass module lines = []; } if (!verbose) { message = lines.join('\n'); // Internal stacks are generally useless so we strip them... with the // exception of stacks containing `webpack:` because they're normally // from user code generated by Webpack. For more information see // https://github.com/facebook/create-react-app/pull/1050 message = message.replace(/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm, '') // at ... ...:x:y ; message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, '') // at <anonymous> ; message = message.replace(/File was processed with these loaders:\n(.+[\\/](next[\\/]dist[\\/].+|@next[\\/]react-refresh-utils[\\/]loader)\.js\n)*You may need an additional loader to handle the result of these loaders.\n/g, ''); lines = message.split('\n'); } // Remove duplicated newlines lines = lines.filter((line, index, arr)=>index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()); // Reassemble the message message = lines.join('\n'); return message.trim(); } function formatWebpackMessages(json, verbose) { const formattedErrors = json.errors.map((message)=>{ const isUnknownNextFontError = message.message.includes('An error occurred in `next/font`.'); return formatMessage(message, isUnknownNextFontError || verbose); }); const formattedWarnings = json.warnings.map((message)=>{ return formatMessage(message, verbose); }); // Reorder errors to put the most relevant ones first. let reactServerComponentsError = -1; for(let i = 0; i < formattedErrors.length; i++){ const error = formattedErrors[i]; if (error.includes('ReactServerComponentsError')) { reactServerComponentsError = i; break; } } // Move the reactServerComponentsError to the top if it exists if (reactServerComponentsError !== -1) { const error = formattedErrors.splice(reactServerComponentsError, 1); formattedErrors.unshift(error[0]); } const result = { ...json, errors: formattedErrors, warnings: formattedWarnings }; if (!verbose && result.errors.some(isLikelyASyntaxError)) { // If there are any syntax errors, show just them. result.errors = result.errors.filter(isLikelyASyntaxError); result.warnings = []; } return result; } //# sourceMappingURL=format-webpack-messages.js.map
Save
cmd:
run