source: frontend/node_modules/fork-ts-checker-webpack-plugin/lib/hooks/tapErrorToLogMessage.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.6 KB
Line 
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const pluginHooks_1 = require("./pluginHooks");
7const RpcIpcMessagePortClosedError_1 = require("../rpc/rpc-ipc/error/RpcIpcMessagePortClosedError");
8const chalk_1 = __importDefault(require("chalk"));
9function tapErrorToLogMessage(compiler, configuration) {
10 const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
11 hooks.error.tap('ForkTsCheckerWebpackPlugin', (error) => {
12 configuration.logger.issues.error(String(error));
13 if (error instanceof RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError) {
14 if (error.signal === 'SIGINT') {
15 configuration.logger.issues.error(chalk_1.default.red('Issues checking service interrupted - If running in a docker container, this may be caused ' +
16 "by the container running out of memory. If so, try increasing the container's memory limit " +
17 'or lowering the `memoryLimit` value in the ForkTsCheckerWebpackPlugin configuration.'));
18 }
19 else {
20 configuration.logger.issues.error(chalk_1.default.red('Issues checking service aborted - probably out of memory. ' +
21 'Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.\n' +
22 "If increasing the memory doesn't solve the issue, it's most probably a bug in the TypeScript or EsLint."));
23 }
24 }
25 });
26}
27exports.tapErrorToLogMessage = tapErrorToLogMessage;
Note: See TracBrowser for help on using the repository browser.