Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng add error "Could not read Angular module file" #14169

Closed
WuglyakBolgoink opened this Issue Apr 15, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@WuglyakBolgoink
Copy link

WuglyakBolgoink commented Apr 15, 2019

馃悶 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [x] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

no

Description

I try to add ngx-bootstrap like:

$ ng add ngx-bootstrap  --component accordion -E

then I see this error:

Could not read Angular module file: /src/@app/application/app.module.ts

And I think, CLI try to use my alias and can't right converting path until app-module...

My tsconfig.json:

{
    "compileOnSave": false,
    "compilerOptions": {
        "baseUrl": "./",
        "outDir": "./dist/out-tsc",
        "sourceMap": true,
        "declaration": false,
        "module": "es2015",
        "moduleResolution": "node",
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "importHelpers": true,
        "target": "es5",
        "typeRoots": [
            "node_modules/@types"
        ],
        "lib": [
            "es2018",
            "dom"
        ],
        "paths": {
            "@app/*": [
                "src/app/*"
            ],
            "@env/*": [
                "src/environments/*"
            ],
            "@models/*": [
                "src/models/*"
            ]
        }
    }
}

馃敩 Minimal Reproduction

$ ng add ngx-bootstrap  --component accordion -E

Installing packages for tooling via npm.
npm WARN bootstrap@4.2.1 requires a peer of popper.js@^1.14.6 but none is installed. You must install peer dependencies yourself.

+ ngx-bootstrap@4.0.1
added 1 package from 1 contributor in 8.762s
Installed packages for tooling via npm.
    鉁咃笍 Added "bootstrap
    鉁咃笍 Added "ngx-bootstrap
    馃攳 Installing packages...
Could not read Angular module file: /src/@app/application/app.module.ts

馃實 Your Environment


Angular CLI: 7.3.8
Node: 11.13.0
OS: darwin x64
Angular: 7.2.13
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.8
@angular-devkit/build-angular     0.13.8
@angular-devkit/build-optimizer   0.13.8
@angular-devkit/build-webpack     0.13.8
@angular-devkit/core              7.3.8
@angular-devkit/schematics        7.3.8
@angular/cli                      7.3.8
@ngtools/webpack                  7.3.8
@schematics/angular               7.3.8
@schematics/update                0.13.8
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0
@alan-agius4

This comment has been minimized.

Copy link
Collaborator

alan-agius4 commented Apr 16, 2019

I'm sorry, but this issue is not caused by Angular CLI. Please contact the author(s) of the ngx-bootstrap project or file an issue on their issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.