3

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
  • try to run the command after clearing cache, npm cache clean -f Commented Jun 26, 2020 at 4:26

2 Answers 2

3

I had a similar issue with an Angular 10 multi-project project.

I wanted to install ng-bootstrap with minimal effort using schematics to set everything up.

The fix for me was:-

ng add @ng-bootstrap/ng-bootstrap

For more information this issue provided the clue. Issue with Angular 10 & ng-bootstrap

Sign up to request clarification or add additional context in comments.

Comments

1

Solution -> MIT shall fix CLI 10.0.0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.