angular8 编译报错 Error: Call retries were exceeded at ChildProcessWorker.initialize,具体如下:
Angular CLI版本: 8.3.21

  1. [error] Error: Call retries were exceeded
  2. at ChildProcessWorker.initialize (/data/html/boboJavaBlog/toolsWeb/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
  3. at ChildProcessWorker.onExit (/data/html/boboJavaBlog/toolsWeb/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)
  4. at ChildProcess.emit (events.js:189:13)
  5. at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

解决办法

tsconfig.json中的target从es2015改为es5

  1. {
  2. "compileOnSave": false,
  3. "compilerOptions": {
  4. "baseUrl": "./",
  5. "outDir": "./dist/out-tsc",
  6. "sourceMap": true,
  7. "declaration": false,
  8. "downlevelIteration": true,
  9. "experimentalDecorators": true,
  10. "module": "esnext",
  11. "moduleResolution": "node",
  12. "importHelpers": true,
  13. "target": "es5",
  14. "typeRoots": [
  15. "node_modules/@types"
  16. ],
  17. "lib": [
  18. "es2018",
  19. "dom"
  20. ]
  21. },
  22. "angularCompilerOptions": {
  23. "fullTemplateTypeCheck": true,
  24. "strictInjectionParameters": true
  25. }
  26. }