【问题标题】:Node.js frequent JavaScript heap out of memory crash on react-scripts-tsNode.js 在 react-scripts-ts 上频繁出现 JavaScript heap out of memory 崩溃
【发布时间】:2022-01-22 00:16:40
【问题描述】:

我有一个react + typescript 项目。从几周前开始,我的 WebStorm IDE 在我对代码进行的每次更新时都会崩溃(JavaScript 堆内存不足)。我正在使用:

  • Node.js 12.3.1
  • TypeScript 3.7.5
  • 反应 16.12.0
  • react-scripts-ts 3.1.0
  • 网络风暴 2021.2
  • 我的操作系统是 Windows 10。

我还根据网上的多个资源将环境变量NODE_OPTIONS设置为--max-old-space-size=4096。然而,似乎 react-scripts-ts 使用内联 max-old-space-size=2048 运行 node.js(基于下面的错误报告),这会导致定义的环境变量不起作用。

这里是每次产生的错误:

{
  "header": {
    "event": "Allocation failed - JavaScript heap out of memory",
    "trigger": "FatalError",
    "filename": "report.20211220.141006.15768.0.001.json",
    "dumpEventTime": "2021-12-20T14:10:06Z",
    "dumpEventTimeStamp": "1639996806776",
    "processId": 15768,
    "cwd": "D:\\GitProjects\\moein-ui",
    "commandLine": [
      "D:\\nodejs\\node.exe",
      "--max-old-space-size=2048",
      "D:\\GitProjects\\moein-ui\\node_modules\\fork-ts-checker-webpack-plugin\\lib\\service.js"
    ],
    "nodejsVersion": "v12.3.1",
    "wordSize": 64,
    "arch": "x64",
    "platform": "win32",
    "componentVersions": {
      "node": "12.3.1",
      "v8": "7.4.288.27-node.18",
      "uv": "1.29.1",
      "zlib": "1.2.11",
      "brotli": "1.0.7",
      "ares": "1.15.0",
      "modules": "72",
      "nghttp2": "1.38.0",
      "napi": "4",
      "llhttp": "1.1.3",
      "http_parser": "2.8.0",
      "openssl": "1.1.1b",
      "cldr": "35.1",
      "icu": "64.2",
      "tz": "2019a",
      "unicode": "12.1"
    },
    "release": {
      "name": "node",
      "headersUrl": "https://nodejs.org/download/release/v12.3.1/node-v12.3.1-headers.tar.gz",
      "sourceUrl": "https://nodejs.org/download/release/v12.3.1/node-v12.3.1.tar.gz",
      "libUrl": "https://nodejs.org/download/release/v12.3.1/win-x64/node.lib"
    },
    "osName": "Windows_NT",
    "osRelease": "10.0.15063",
    "osVersion": "Windows 10 Enterprise",
    "osMachine": "x86_64",
    "host": "DESKTOP-MDD0UUA"
  },
  "javascriptStack": {
    "message": "No stack.",
    "stack": [
      "Unavailable."
    ]
  },
  "nativeStack": [
    {
      "pc": "0x00007ff73dbd54e9",
      "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+9161"
    },
    {
      "pc": "0x00007ff73dbd8dd4",
      "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+23732"
    },
    {
      "pc": "0x00007ff73dbd7df8",
      "symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+19672"
    },
    {
      "pc": "0x00007ff73dcc0c9b",
      "symbol": "uv_loop_fork+48251"
    },
    {
      "pc": "0x00007ff73dff8bce",
      "symbol": "v8::internal::Parser::ReportMessageAt+206"
    },
    {
      "pc": "0x00007ff73dfccc4a",
      "symbol": "v8::internal::wasm::StreamingDecoder::Fail+666"
    },
    {
      "pc": "0x00007ff73e06309c",
      "symbol": "v8::internal::Heap::CreateFillerObjectAt+2972"
    },
    {
      "pc": "0x00007ff73e06ae0f",
      "symbol": "v8::internal::LocalEmbedderHeapTracer::NotifyV8MarkingWorklistWasEmpty+5375"
    },
    {
      "pc": "0x00007ff73e061483",
      "symbol": "v8::internal::Heap::CollectGarbage+1235"
    },
    {
      "pc": "0x00007ff73e05fb84",
      "symbol": "v8::internal::GCTracer::AddScopeSample+1316"
    },
    {
      "pc": "0x00007ff73e0a07b3",
      "symbol": "v8::internal::Factory::NewFillerObject+67"
    },
    {
      "pc": "0x00007ff73e3c76e6",
      "symbol": "v8::internal::OptimizingCompileDispatcher::Unblock+116966"
    },
    {
      "pc": "0x00007ff73e862c16",
      "symbol": "v8::internal::NativesCollection<0>::GetScriptsSource+662454"
    }
  ],
  "javascriptHeap": {
    "totalMemory": 2168434688,
    "totalCommittedMemory": 2168434688,
    "usedMemory": 2083581904,
    "availableMemory": 64011088,
    "memoryLimit": 2197815296,
    "heapSpaces": {
      "read_only_space": {
        "memorySize": 524288,
        "committedMemory": 524288,
        "capacity": 523976,
        "used": 31712,
        "available": 492264
      },
      "new_space": {
        "memorySize": 33554432,
        "committedMemory": 33554432,
        "capacity": 16767232,
        "used": 467608,
        "available": 16299624
      },
      "old_space": {
        "memorySize": 2002378752,
        "committedMemory": 2002378752,
        "capacity": 1954653600,
        "used": 1953582240,
        "available": 1071360
      },
      "code_space": {
        "memorySize": 10649600,
        "committedMemory": 10649600,
        "capacity": 8994080,
        "used": 8994080,
        "available": 0
      },
      "map_space": {
        "memorySize": 1576960,
        "committedMemory": 1576960,
        "capacity": 938480,
        "used": 938480,
        "available": 0
      },
      "large_object_space": {
        "memorySize": 119701504,
        "committedMemory": 119701504,
        "capacity": 119564328,
        "used": 119564328,
        "available": 0
      },
      "code_large_object_space": {
        "memorySize": 49152,
        "committedMemory": 49152,
        "capacity": 3456,
        "used": 3456,
        "available": 0
      },
      "new_large_object_space": {
        "memorySize": 0,
        "committedMemory": 0,
        "capacity": 16767232,
        "used": 0,
        "available": 16767232
      }
    }
  },
  "resourceUsage": {
    "userCpuSeconds": 348.5,
    "kernelCpuSeconds": 4.718,
    "cpuConsumptionPercent": 16.5055,
    "maxRss": 2275651584,
    "pageFaults": {
      "IORequired": 1331208,
      "IONotRequired": 0
    },
    "fsActivity": {
      "reads": 7576,
      "writes": 7
    }
  },
  "libuv": [
  ],
  "environmentVariables": {
    "=C:": "C:\\",
    "ALLUSERSPROFILE": "C:\\ProgramData",
    "ANDROID_HOME": "D:\\Sdk",
    "APPDATA": "C:\\Users\\farzad\\AppData\\Roaming",
    "BABEL_ENV": "development",
    "CHECK_SYNTACTIC_ERRORS": "false",
    "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
    "ChocolateyLastPathUpdate": "132131941511207164",
    "CommonProgramFiles": "C:\\Program Files\\Common Files",
    "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
    "CommonProgramW6432": "C:\\Program Files\\Common Files",
    "COMPUTERNAME": "DESKTOP-MDD0UUA",
    "ComSpec": "C:\\Windows\\system32\\cmd.exe",
    "dp0": "D:\\GitProjects\\moein-ui\\node_modules\\.bin\\",
    "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
    "FPS_BROWSER_USER_PROFILE_STRING": "Default",
    "HOME": "C:\\Users\\farzad",
    "HOMEDRIVE": "C:",
    "HOMEPATH": "\\Users\\farzad",
    "IDEA_INITIAL_DIRECTORY": "C:\\Windows\\System32",
    "INIT_CWD": "D:\\GitProjects\\moein-ui",
    "IntelliJ IDEA": "D:\\JetBrains\\IntelliJ IDEA 2021.2.3\\bin;",
    "JAVA_HOME": "D:\\Java\\jdk1.8.0_45",
    "LOCALAPPDATA": "C:\\Users\\farzad\\AppData\\Local",
    "LOGONSERVER": "\\\\DESKTOP-MDD0UUA",
    "MEMORY_LIMIT": "2048",
    "NODE": "D:\\nodejs\\node.exe",
    "NODE_ENV": "development",
    "NODE_OPTIONS=--max-old-space-size": "4096",
    "NODE_PATH": "",
    "npm_config_access": "",
    "npm_config_allow_same_version": "",
    "npm_config_also": "",
    "npm_config_always_auth": "",
    "npm_config_argv": "{\"remain\":[],\"cooked\":[\"start\"],\"original\":[\"start\"]}",
    "npm_config_audit": "true",
    "npm_config_audit_level": "low",
    "npm_config_auth_type": "legacy",
    "npm_config_before": "",
    "npm_config_bin_links": "true",
    "npm_config_browser": "",
    "npm_config_ca": "",
    "npm_config_cache": "C:\\Users\\farzad\\AppData\\Roaming\\npm-cache",
    "npm_config_cache_lock_retries": "10",
    "npm_config_cache_lock_stale": "60000",
    "npm_config_cache_lock_wait": "10000",
    "npm_config_cache_max": "Infinity",
    "npm_config_cache_min": "10",
    "npm_config_cafile": "",
    "npm_config_cert": "",
    "npm_config_cidr": "",
    "npm_config_color": "true",
    "npm_config_commit_hooks": "true",
    "npm_config_depth": "Infinity",
    "npm_config_description": "true",
    "npm_config_dev": "",
    "npm_config_dry_run": "",
    "npm_config_editor": "notepad.exe",
    "npm_config_engine_strict": "",
    "npm_config_fetch_retries": "2",
    "npm_config_fetch_retry_factor": "10",
    "npm_config_fetch_retry_maxtimeout": "60000",
    "npm_config_fetch_retry_mintimeout": "10000",
    "npm_config_force": "",
    "npm_config_git": "git",
    "npm_config_git_tag_version": "true",
    "npm_config_global": "",
    "npm_config_globalconfig": "C:\\Users\\farzad\\AppData\\Roaming\\npm\\etc\\npmrc",
    "npm_config_globalignorefile": "C:\\Users\\farzad\\AppData\\Roaming\\npm\\etc\\npmignore",
    "npm_config_global_style": "",
    "npm_config_group": "",
    "npm_config_ham_it_up": "",
    "npm_config_heading": "npm",
    "npm_config_https_proxy": "",
    "npm_config_if_present": "",
    "npm_config_ignore_prepublish": "",
    "npm_config_ignore_scripts": "",
    "npm_config_init_author_email": "",
    "npm_config_init_author_name": "",
    "npm_config_init_author_url": "",
    "npm_config_init_license": "ISC",
    "npm_config_init_module": "C:\\Users\\farzad\\.npm-init.js",
    "npm_config_init_version": "1.0.0",
    "npm_config_json": "",
    "npm_config_key": "",
    "npm_config_legacy_bundling": "",
    "npm_config_link": "",
    "npm_config_local_address": "",
    "npm_config_loglevel": "notice",
    "npm_config_logs_max": "10",
    "npm_config_long": "",
    "npm_config_maxsockets": "50",
    "npm_config_message": "%s",
    "npm_config_metrics_registry": "https://registry.npmjs.org/",
    "npm_config_node_gyp": "D:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
    "npm_config_node_options": "",
    "npm_config_node_version": "12.3.1",
    "npm_config_noproxy": "",
    "npm_config_offline": "",
    "npm_config_onload_script": "",
    "npm_config_only": "",
    "npm_config_optional": "true",
    "npm_config_otp": "",
    "npm_config_package_lock": "true",
    "npm_config_package_lock_only": "",
    "npm_config_parseable": "",
    "npm_config_prefer_offline": "",
    "npm_config_prefer_online": "",
    "npm_config_prefix": "C:\\Users\\farzad\\AppData\\Roaming\\npm",
    "npm_config_preid": "",
    "npm_config_production": "",
    "npm_config_progress": "true",
    "npm_config_proxy": "",
    "npm_config_read_only": "",
    "npm_config_rebuild_bundle": "true",
    "npm_config_registry": "https://registry.npmjs.org/",
    "npm_config_rollback": "true",
    "npm_config_save": "true",
    "npm_config_save_bundle": "",
    "npm_config_save_dev": "",
    "npm_config_save_exact": "",
    "npm_config_save_optional": "",
    "npm_config_save_prefix": "^",
    "npm_config_save_prod": "",
    "npm_config_scope": "",
    "npm_config_scripts_prepend_node_path": "warn-only",
    "npm_config_script_shell": "",
    "npm_config_searchexclude": "",
    "npm_config_searchlimit": "20",
    "npm_config_searchopts": "",
    "npm_config_searchstaleness": "900",
    "npm_config_send_metrics": "",
    "npm_config_shell": "C:\\Windows\\system32\\cmd.exe",
    "npm_config_shrinkwrap": "true",
    "npm_config_sign_git_commit": "",
    "npm_config_sign_git_tag": "",
    "npm_config_sso_poll_frequency": "500",
    "npm_config_sso_type": "oauth",
    "npm_config_strict_ssl": "true",
    "npm_config_tag": "latest",
    "npm_config_tag_version_prefix": "v",
    "npm_config_timing": "",
    "npm_config_tmp": "C:\\Users\\farzad\\AppData\\Local\\Temp",
    "npm_config_umask": "0000",
    "npm_config_unicode": "",
    "npm_config_unsafe_perm": "true",
    "npm_config_update_notifier": "true",
    "npm_config_usage": "",
    "npm_config_user": "",
    "npm_config_userconfig": "C:\\Users\\farzad\\.npmrc",
    "npm_config_user_agent": "npm/6.9.0 node/v12.3.1 win32 x64",
    "npm_config_version": "",
    "npm_config_versions": "",
    "npm_config_viewer": "browser",
    "npm_execpath": "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js",
    "npm_lifecycle_event": "start",
    "npm_lifecycle_script": "react-scripts-ts start",
    "npm_node_execpath": "D:\\nodejs\\node.exe",
    "npm_package_dependencies_ace_builds": "1.4.8",
    "npm_package_dependencies_antlr4": "4.8.0",
    "npm_package_dependencies_axios": "0.19.2",
    "npm_package_dependencies_babel_polyfill": "6.26.0",
    "npm_package_dependencies_brace": "0.11.1",
    "npm_package_dependencies_file_saver": "2.0.2",
    "npm_package_dependencies_glamor": "2.20.40",
    "npm_package_dependencies_highcharts": "7.1.2",
    "npm_package_dependencies_highcharts_react_official": "2.2.2",
    "npm_package_dependencies_jalali_moment": "3.3.3",
    "npm_package_dependencies_jspdf": "1.5.3",
    "npm_package_dependencies_lodash": "4.17.15",
    "npm_package_dependencies_minimist": "1.2.5",
    "npm_package_dependencies_react": "16.12.0",
    "npm_package_dependencies_react_ace": "8.0.0",
    "npm_package_dependencies_react_dnd": "7.4.5",
    "npm_package_dependencies_react_dnd_html5_backend": "7.4.4",
    "npm_package_dependencies_react_dom": "16.12.0",
    "npm_package_dependencies_react_grid_layout": "1.1.0",
    "npm_package_dependencies_react_redux": "7.0.3",
    "npm_package_dependencies_react_resize_detector": "4.2.1",
    "npm_package_dependencies_react_scripts_ts": "3.1.0",
    "npm_package_dependencies_redux": "4.0.1",
    "npm_package_dependencies_rgbcolor": "1.0.1",
    "npm_package_dependencies_rtl_css_js": "1.14.0",
    "npm_package_dependencies_stackblur": "1.0.0",
    "npm_package_dependencies_timeago_js": "4.0.2",
    "npm_package_dependencies_timeago_react": "3.0.1",
    "npm_package_dependencies__stomp_stompjs": "6.1.0",
    "npm_package_dependencies__webscopeio_react_textarea_autocomplete": "4.6.2",
    "npm_package_description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
    "npm_package_devDependencies_enzyme": "3.10.0",
    "npm_package_devDependencies_enzyme_adapter_react_16": "1.15.1",
    "npm_package_devDependencies_npm_check_updates": "4.0.1",
    "npm_package_devDependencies_npm_run_all": "4.1.5",
    "npm_package_devDependencies_source_map_explorer": "2.2.2",
    "npm_package_devDependencies_typescript": "3.7.5",
    "npm_package_devDependencies_type_zoo": "3.4.1",
    "npm_package_devDependencies__types_enzyme": "3.10.4",
    "npm_package_devDependencies__types_enzyme_adapter_react_16": "1.0.5",
    "npm_package_devDependencies__types_file_saver": "2.0.1",
    "npm_package_devDependencies__types_jest": "26.0.19",
    "npm_package_devDependencies__types_jspdf": "1.3.3",
    "npm_package_devDependencies__types_lodash": "4.14.149",
    "npm_package_devDependencies__types_memoize_one": "5.1.2",
    "npm_package_devDependencies__types_minimist": "1.2.1",
    "npm_package_devDependencies__types_node": "12.12.20",
    "npm_package_devDependencies__types_react": "16.9.16",
    "npm_package_devDependencies__types_react_dom": "16.9.4",
    "npm_package_devDependencies__types_react_grid_layout": "1.1.0",
    "npm_package_devDependencies__types_react_resize_detector": "4.2.0",
    "npm_package_devDependencies__types_webscopeio__react_textarea_autocomplete": "4.6.3",
    "npm_package_gitHead": "a9f423235f35dee06be56d5e518a3214b1bfccd9",
    "npm_package_jest_moduleFileExtensions_0": "tsx",
    "npm_package_jest_moduleFileExtensions_1": "ts",
    "npm_package_jest_moduleFileExtensions_2": "js",
    "npm_package_jest_moduleFileExtensions_3": "jsx",
    "npm_package_jest_moduleNameMapper__Formula_ace_exportUtils_highchartsLoader__": "<rootDir>/__mocks__/fileMock.js",
    "npm_package_jest_moduleNameMapper____css_less__": "<rootDir>/__mocks__/styleMock.js",
    "npm_package_jest_moduleNameMapper____jpg_jpeg_png_gif_eot_otf_webp_svg_ttf_woff_woff2_mp4_webm_wav_mp3_m4a_aac_oga__": "<rootDir>/__mocks__/fileMock.js",
    "npm_package_jest_testMatch_0": "<rootDir>/src/**/*.test.(tsx|ts)",
    "npm_package_jest_testURL": "http://localhost/",
    "npm_package_jest_transform___ts_tsx_": "ts-jest",
    "npm_package_name": "moein-ui",
    "npm_package_private": "true",
    "npm_package_readmeFilename": "README.md",
    "npm_package_scripts_analyse": "source-map-explorer build/static/js/main.*",
    "npm_package_scripts_antrl4": "npm-run-all -s compositeEventFormula compositeKpiFormula",
    "npm_package_scripts_autofix": "tslint --project . --fix",
    "npm_package_scripts_build": "react-scripts-ts build",
    "npm_package_scripts_compositeEventFormula=antlr4 -Dlanguage": "JavaScript -no-listener -o src/lib/input/code/compositeEventFormula src/lib/input/code/compositeEventFormula/CompositeEventFormula.g4",
    "npm_package_scripts_compositeKpiFormula=antlr4 -Dlanguage": "JavaScript -no-listener -o src/lib/input/code/compositeKpiFormula src/lib/input/code/compositeKpiFormula/CompositeKpiFormula.g4",
    "npm_package_scripts_eject": "react-scripts-ts eject",
    "npm_package_scripts_lint": "tslint --project .",
    "npm_package_scripts_ncu": "ncu -i -u --removeRange",
    "npm_package_scripts_postinstall": "node ./scripts/injectGlamorPlugins.js",
    "npm_package_scripts_start": "react-scripts-ts start",
    "npm_package_scripts_test=jest --setupTestFrameworkScriptFile=raf/polyfill --forceExit --ci -w": "2 --logHeapUsage",
    "npm_package_scripts_update_kpis": "node ./scripts/updateKpis.js",
    "npm_package_version": "1.7.2",
    "NUMBER_OF_PROCESSORS": "8",
    "OneDrive": "C:\\Users\\farzad\\OneDrive",
    "OS": "Windows_NT",
    "Path": "D:\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;D:\\GitProjects\\moein-ui\\node_modules\\.bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files\\Docker\\Docker\\Resources\\bin;C:\\Python27\\;C:\\Python27\\Scripts;D:\\MiKTeX 2.9\\miktex\\bin;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5 & MySQL Utilities 1.5\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5 & MySQL Utilities 1.5\\Doctrine extensions for PHP\\;D:\\nodejs\\node-v8.11.1-win-x64;%JAVA_HOME%\\bin\\;D:\\Git\\bin;C:\\ProgramData\\chocolatey\\bin;D:\\Sdk\\platform-tools;D:\\Git\\usr\\bin;D:\\nodejs\\;C:\\Users\\farzad\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Behsazan VPN\\Sophos SSL VPN Client\\bin;D:\\JetBrains\\IntelliJ IDEA 2021.2.3\\bin;;C:\\Users\\farzad\\AppData\\Roaming\\npm",
    "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC",
    "PROCESSOR_ARCHITECTURE": "AMD64",
    "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 158 Stepping 9, GenuineIntel",
    "PROCESSOR_LEVEL": "6",
    "PROCESSOR_REVISION": "9e09",
    "ProgramData": "C:\\ProgramData",
    "ProgramFiles": "C:\\Program Files",
    "ProgramFiles(x86)": "C:\\Program Files (x86)",
    "ProgramW6432": "C:\\Program Files",
    "PROMPT": "$P$G",
    "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
    "PUBLIC": "C:\\Users\\Public",
    "REACT_APP_DEBUG": "true",
    "REACT_APP_VERSION": "1.7.2",
    "SESSIONNAME": "Console",
    "SystemDrive": "C:",
    "SystemRoot": "C:\\Windows",
    "TEMP": "C:\\Users\\farzad\\AppData\\Local\\Temp",
    "TMP": "C:\\Users\\farzad\\AppData\\Local\\Temp",
    "TSCONFIG": "D:\\GitProjects\\moein-ui\\tsconfig.json",
    "TSLINT": "D:\\GitProjects\\moein-ui\\tslint.json",
    "USERDOMAIN": "DESKTOP-MDD0UUA",
    "USERDOMAIN_ROAMINGPROFILE": "DESKTOP-MDD0UUA",
    "USERNAME": "farzad",
    "USERPROFILE": "C:\\Users\\farzad",
    "VBOX_MSI_INSTALL_PATH": "D:\\VirtualBox\\",
    "WATCH": "D:\\GitProjects\\moein-ui\\src",
    "windir": "C:\\Windows",
    "WORK_DIVISION": "1",
    "_prog": "node"
  },
  "sharedObjects": [
    "D:\\nodejs\\node.exe",
    "C:\\Windows\\SYSTEM32\\ntdll.dll",
    "C:\\Windows\\System32\\KERNEL32.DLL",
    "C:\\Windows\\System32\\KERNELBASE.dll",
    "C:\\Windows\\System32\\WS2_32.dll",
    "C:\\Windows\\System32\\sechost.dll",
    "C:\\Windows\\System32\\RPCRT4.dll",
    "C:\\Windows\\System32\\ADVAPI32.dll",
    "C:\\Windows\\System32\\msvcrt.dll",
    "C:\\Windows\\System32\\USER32.dll",
    "C:\\Windows\\System32\\win32u.dll",
    "C:\\Windows\\System32\\GDI32.dll",
    "C:\\Windows\\SYSTEM32\\dbghelp.dll",
    "C:\\Windows\\System32\\gdi32full.dll",
    "C:\\Windows\\System32\\ucrtbase.dll",
    "C:\\Windows\\System32\\msvcp_win.dll",
    "C:\\Windows\\System32\\PSAPI.DLL",
    "C:\\Windows\\System32\\CRYPT32.dll",
    "C:\\Windows\\System32\\MSASN1.dll",
    "C:\\Windows\\SYSTEM32\\IPHLPAPI.DLL",
    "C:\\Windows\\SYSTEM32\\USERENV.dll",
    "C:\\Windows\\SYSTEM32\\bcrypt.dll",
    "C:\\Windows\\System32\\profapi.dll",
    "C:\\Windows\\SYSTEM32\\WINMM.dll",
    "C:\\Windows\\SYSTEM32\\winmmbase.dll",
    "C:\\Windows\\System32\\cfgmgr32.dll",
    "C:\\Windows\\System32\\IMM32.DLL",
    "C:\\Windows\\System32\\powrprof.dll",
    "C:\\Windows\\system32\\uxtheme.dll",
    "C:\\Windows\\System32\\combase.dll",
    "C:\\Windows\\System32\\bcryptPrimitives.dll",
    "C:\\Windows\\system32\\mswsock.dll",
    "C:\\Windows\\System32\\kernel.appcore.dll",
    "C:\\Windows\\system32\\napinsp.dll",
    "C:\\Windows\\system32\\pnrpnsp.dll",
    "C:\\Windows\\system32\\NLAapi.dll",
    "C:\\Windows\\SYSTEM32\\DNSAPI.dll",
    "C:\\Windows\\System32\\NSI.dll",
    "C:\\Windows\\System32\\winrnr.dll"
  ]
}

提前感谢任何帮助。

【问题讨论】:

    标签: node.js reactjs typescript webstorm


    【解决方案1】:

    从日志看来这是fork-ts-checker-webpack-plugin内存不足。

    您可以尝试按照https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#typescript-options 中的说明在自定义.fork-ts-checkerrc 文件中指定内存限制

    【讨论】:

    • 不确定问题与 Webstorm 有什么关系,顺便说一句
    • 谢谢@lena。你知道我应该如何设置它吗?根据您提到的链接,我在package.json 末尾添加了以下配置。但似乎配置不起作用。 "fork-ts-checker": { "typescript": { "memoryLimit": "4096" } }
    猜你喜欢
    • 2019-06-18
    • 2021-12-17
    • 1970-01-01
    • 2021-09-02
    • 1970-01-01
    • 1970-01-01
    • 2018-08-01
    • 2017-05-21
    • 2022-12-12
    相关资源
    最近更新 更多