Callback was already called angular cli

前端 未结 4 499
予麋鹿
予麋鹿 2021-02-04 11:30

I updated my angular-cli then i got error in ng serve

 Callback was already called.
at throwError (node_modules\\neo-async\\async.js:14:11)
at node_modules\\neo-         


        
4条回答
  •  天涯浪人
    2021-02-04 12:09

    I encountered this problem when trying to add lazy load feature in Angular 8.

    ├─┬ @angular-devkit/build-angular@0.803.29
    | └── webpack@4.39.2 
    └── webpack@4.41.1 
    

    I tried to update @angular-devkit/build-angular to latest but was not working. Many new issues surfaced. When I removed webpack@4.41.1, the same problem 'cannot find module webpack'. So I tried to make the webpack versions same. Used 'npm install webpack@4.39.2'. Finally the problem was solved. When I type 'npm ls webpack', only one webpack is shown and the build works fine.

    `-- @angular-devkit/build-angular@0.803.29
      `-- webpack@4.39.2
    

提交回复
热议问题