首页 > 解决方案 > webpack 4.8.3 e.merge 不是函数异常

问题描述

一旦我运行核心项目,我就会收到下面的异常。

 dotnet run
    info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
          User profile is available. Using 'C:\Users\pc\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
    fail: Microsoft.AspNetCore.NodeServices[0]
          (node:17308) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    Hosting environment: Development
    Content root path: D:\vega
    Now listening on: http://localhost:5000
    Application started. Press Ctrl+C to shut down.
    info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
          Request starting HTTP/1.1 GET http://localhost:5000/
    info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
          Executing action method vega.Controllers.HomeController.Index (vega) with arguments ((null)) - ModelState is Valid
    info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
          Executing ViewResult, running view at path /Views/Home/Index.cshtml.
    info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
          Executed action vega.Controllers.HomeController.Index (vega) in 6024.6747ms
    fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]
          An unhandled exception has occurred while executing the request
    Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: e.merge is not a function
    TypeError: e.merge is not a function
        at new t (D:\vega\ClientApp\dist\vendor.js:280:4447)

自2天以来一直在挣扎,但没有任何成功。所有这些都是在项目中的一些 webpack 和依赖项更新之后发生的。过去一切正常。

下面是我列出的包版本;

Angular CLI: 6.0.1
Node: 8.11.1
OS: win32 x64
Angular: 6.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.1
@angular-devkit/core         0.6.1
@angular-devkit/schematics   0.6.1
@ngtools/webpack             6.0.0
@schematics/angular          0.6.1
@schematics/update           0.6.1
rxjs                         5.5.2
typescript                   2.8.3
webpack                      4.8.3

标签: webpackasp.net-coreangular-cli

解决方案


推荐阅读