Angular Install ng-bootstrap: Cannot find module '@schematics/angular/utility/project'

无人久伴 提交于 2020-07-09 06:48:50

问题


The system throws error during ng-bootstrap installation:

[error] Error: Cannot find module '@schematics/angular/utility/project'
Require stack:
- C:\angular\gis-semantics-framework\node_modules\@ng-bootstrap\ng-bootstrap\schematics\ng-add\index.js
- C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\tools\index.js
- C:\angular\gis-semantics-framework\node_modules\@angular\cli\utilities\json-schema.js
- C:\angular\gis-semantics-framework\node_modules\@angular\cli\models\command-runner.js
- C:\angular\gis-semantics-framework\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\fiona\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\fiona\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\angular\gis-semantics-framework\node_modules\@ng-bootstrap\ng-bootstrap\schematics\ng-add\index.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at new ExportStringRef (C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\tools\export-ref.js:19:25)
    at NodeModulesEngineHost._resolveReferenceString (C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\tools\node-module-engine-host.js:95:21)
    at NodeModulesEngineHost.createSchematicDescription (C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\tools\file-system-engine-host-base.js:174:34)
    at SchematicEngine.createSchematic (C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\src\engine\engine.js:220:38)
    at CollectionImpl.createSchematic (C:\angular\gis-semantics-framework\node_modules\@angular-devkit\schematics\src\engine\engine.js:70:29)

Angular version:

Angular CLI: 10.0.0
Node: 12.18.0
OS: win32 x64

Angular: 10.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.0
@angular-devkit/build-angular     0.1000.0
@angular-devkit/build-optimizer   0.1000.0
@angular-devkit/build-webpack     0.1000.0
@angular-devkit/core              10.0.0
@angular-devkit/schematics        10.0.0
@ngtools/webpack                  10.0.0
@schematics/angular               10.0.0
@schematics/update                0.1000.0
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.43.0

Can someone help to solve the problem?


回答1:


Solution -> MIT shall fix CLI 10.0.0

https://github.com/ng-bootstrap/ng-bootstrap/issues/3788


来源:https://stackoverflow.com/questions/62587172/angular-install-ng-bootstrap-cannot-find-module-schematics-angular-utility-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!