代码之家  ›  专栏  ›  技术社区  ›  rcanpahali

找不到模块:错误:无法解析“ngx引导”

  •  0
  • rcanpahali  · 技术社区  · 6 年前

    我正在尝试在将Angular版本升级到v8之后构建我的项目,当我编译我的项目时,我遇到了以下错误,

    1>Module not found : error : Can't resolve 'ngx-bootstrap' in 'C:\Users\can.pahali\source\WestCore.MvcSpa-Upgrade'
    1>     @ dll vendor vendor[9]
    1>    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/bootstrap/dist/css/bootstrap.css:
    1>        Entrypoint mini-css-extract-plugin = *
    1>    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/font-awesome/css/font-awesome.css:
    1>        Entrypoint mini-css-extract-plugin = *
    1>    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/startbootstrap-sb-admin-2/dist/css/sb-admin-2.css:
    1>        Entrypoint mini-css-extract-plugin = *
    1>C:\Users\can.pahali\source\WestCore.MvcSpa-Upgrade\WestCore.MvcSpa.csproj(156,5): error MSB3073: The command "node --max-old-space-size=4096 node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" exited with code 2.
    1>Done building project "WestCore.MvcSpa.csproj" -- FAILED.
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
    

    我的 ng v 输出在这里,

    Angular CLI: 8.3.27
    Node: 13.5.0
    OS: win32 x64
    Angular: 8.2.14
    ... animations, common, compiler, compiler-cli, core, forms
    ... language-service, platform-browser, platform-browser-dynamic
    ... platform-server, router
    
    Package                           Version
    -----------------------------------------------------------
    @angular-devkit/architect         0.901.8
    @angular-devkit/build-angular     0.901.8
    @angular-devkit/build-optimizer   0.901.8
    @angular-devkit/build-webpack     0.901.8
    @angular-devkit/core              7.1.2
    @angular-devkit/schematics        8.3.27
    @angular/cdk                      8.2.3
    @angular/cli                      8.3.27
    @angular/http                     7.2.16
    @ngtools/webpack                  7.1.2
    @nguniversal/aspnetcore-engine    7.1.1
    @nguniversal/common               7.1.1
    @schematics/angular               8.3.27
    @schematics/update                0.803.27
    rxjs                              6.5.5
    typescript                        3.5.3
    webpack                           4.43.0
    

    我也检查了我的ngx引导程序的导入,它们看起来都没有错误。我也可以分享我的包.json如果需要,请归档。 我真的被困在这里了,任何帮助都能维持我的生命,谢谢。

    谨致问候。

    0 回复  |  直到 6 年前
        1
  •  0
  •   rcanpahali    6 年前

    我想我已经解决了这个问题,我用 ngx-bootstrap@5.6.2 ,我降低了版本 ngx-bootstrap@5.5.0 问题就解决了。我的Angular 8版本一定有问题,与> ngx-bootstrep@5.5.0 . 我也会在github上报告这个问题。