gpt4 book ai didi

angular - TypeError : angularCompiler. getNextProgram 不是函数

转载 作者:行者123 更新时间:2023-12-04 04:25:32 32 4
gpt4 key购买 nike

我在我的机器上使用 angular 11.2,我想运行一个 angular 12 项目。从 git 克隆后,我运行了以下命令。

  • npm install
  • ng serve

  • 但是我遇到了以下错误并且无法运行该项目。
    我读了 this question但它对我不起作用。
    Error: ./src/main.ts
    Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
    TypeError: angularCompiler.getNextProgram is not a function
    at C:\Users\thimira_p\Desktop\itrd\epic-itrda-web\node_modules\@ngtools\webpack\src\ivy\plugin.js:376:100
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

    Error: ./src/polyfills.ts
    Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
    TypeError: angularCompiler.getNextProgram is not a function
    at C:\Users\thimira_p\Desktop\itrd\epic-itrda-web\node_modules\@ngtools\webpack\src\ivy\plugin.js:376:100
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

    Error: (webpack)-dev-server/client?http://0.0.0.0:0&sockPath=/sockjs-node
    Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
    TypeError: angularCompiler.getNextProgram is not a function
    at C:\Users\thimira_p\Desktop\itrd\epic-itrda-web\node_modules\@ngtools\webpack\src\ivy\plugin.js:376:100
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    如何解决这个问题?

    最佳答案

    @angular-devkit/build-angular@0.1100 升级至 @angular-devkit/build-angular@12

    关于angular - TypeError : angularCompiler. getNextProgram 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67406121/

    32 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com