Rocky_Mountain_Vending/.pnpm-store/v10/files/6d/6db92b2ab8bc8a099429ed6e099051270e411ec50eac6ee47b9a2a9485e8700f746993adc2ed736365a986f340390192d4d6a9a629b86788ce5c7eabfecb51
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

32 lines
No EOL
1.3 KiB
Text

import { bold, cyan, red, yellow } from '../../../../lib/picocolors';
import { SimpleWebpackError } from './simpleWebpackError';
const regexScssError = /SassError: (.+)\n\s+on line (\d+) [\s\S]*?>> (.+)\n\s*(-+)\^$/m;
export function getScssError(fileName, fileContent, err) {
if (err.name !== 'SassError') {
return false;
}
const res = regexScssError.exec(err.message);
if (res) {
const [, reason, _lineNumer, backupFrame, columnString] = res;
const lineNumber = Math.max(1, parseInt(_lineNumer, 10));
const column = (columnString == null ? void 0 : columnString.length) ?? 1;
let frame;
if (fileContent) {
try {
const { codeFrameColumns } = require('next/dist/compiled/babel/code-frame');
frame = codeFrameColumns(fileContent, {
start: {
line: lineNumber,
column
}
}, {
forceColor: true
});
} catch {}
}
return new SimpleWebpackError(`${cyan(fileName)}:${yellow(lineNumber.toString())}:${yellow(column.toString())}`, red(bold('Syntax error')).concat(`: ${reason}\n\n${frame ?? backupFrame}`));
}
return false;
}
//# sourceMappingURL=parseScss.js.map