question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dropdown.ngfactory missing / AOT bug

See original GitHub issue

Bug description:

I’ve tried to create an AOT build using angular-cli and ng-bootstrap. However, there appears to be an issue during AOT compilation generating an ngfactory for the dropdown component (see below).

Is anyone else able to AOT build with ng-bootstrap?

> ng build --target=${TARGET:-development} --environment=${ENVIRONMENT:-dev} --aot=${AOT:-false}

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
 13% building modules 28/113 modules 85 active ...rap/ng-bootstrap/dropdown/dropdown.jsresolve '../node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory' in '/Users/jr/dev/console/console/src/app'
  using description file: /Users/jr/dev/console/console/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/jr/dev/console/console/package.json (relative path: ./src/app)
    using description file: /Users/jr/dev/console/console/package.json (relative path: ./src/node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory)
      as directory
        /Users/jr/dev/console/console/src/node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory doesn't exist
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/jr/dev/console/console/src/node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/jr/dev/console/console/src/node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/jr/dev/console/console/src/node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory.js doesn't exist

/Users/jr/dev/console/console/node_modules/webpack/lib/Compiler.js:220
                    if(err) return callback(err);
                    ^
TypeError: Cannot read property 'hash' of undefined
    at /Users/jr/dev/console/console/node_modules/angular-cli/tasks/build-webpack.js:35:26

Link to minimally-working plunker that reproduces the issue:

Not applicable

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 2.1

ng-bootstrap: 1.0.0-alpha.9

Bootstrap: 4.0.0-alpha.5

angular-cli: 1.0.0-beta.18

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pkozlowski-opensourcecommented, Oct 27, 2016

I was able to reproduce with Angular 2.1.1 using https://github.com/pkozlowski-opensource/ng-bootstrap-aot

There is a mix of Angular bugs that we can work-around as well as few things that we’ve messed up… Sent #973 to fix both…

0reactions
spock123commented, Oct 27, 2016

Dropdown factory also missing in my aot builds…

Angular 2.1.1 Webpack 2.1.0-beta.22 ng-bootstrap: Alpha 9

Both the Datepicker and Dropdown modules fail:

ERROR in ./compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts
Module not found: Error: Can't resolve '../../../../../node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ngfactory' in '/Users/spock/projects/branches/Iticket-Frontend/compiled/src/app/components/shell/navigation'
 @ ./compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts 19:0-111
 @ ./compiled/src/app/components/app.component.ngfactory.ts
 @ ./compiled/src/app/app.module.ngfactory.ts
 @ ./src/app/index.aot.ts

ERROR in [default] /Users/spock/projects/branches/Iticket-Frontend/compiled/node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker.ngfactory.ts:145:8 
Supplied parameters do not match any signature of call target.

ERROR in [default] /Users/spock/projects/branches/Iticket-Frontend/compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts:131:29 
Module ''*'' has no exported member 'Wrapper_NgbDropdown'.

ERROR in [default] /Users/spock/projects/branches/Iticket-Frontend/compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts:134:35 
Module ''*'' has no exported member 'Wrapper_NgbDropdownToggle'.

ERROR in [default] /Users/spock/projects/branches/Iticket-Frontend/compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts:929:29 
Module ''*'' has no exported member 'Wrapper_NgbDropdown'.

ERROR in [default] /Users/spock/projects/branches/Iticket-Frontend/compiled/src/app/components/shell/navigation/navigation.component.ngfactory.ts:932:35 
Module ''*'' has no exported member 'Wrapper_NgbDropdownToggle'.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular compiler options
When you use ahead-of-time compilation (AOT), you can control how your application is compiled by specifying template compiler options in the TypeScript ...
Read more >
Unable to run {N} application with AOT, Reflect.getMetadata is ...
Demo project that errors when using aot: https://github.com/annervisser/nativescript-aot-error. The application runs perfectly using JIT, ...
Read more >
Change Log - /layout - Kendo UI for Angular - Telerik
Bug Fixes. update tab when selected property is changed; render child items templates correctly; add unique id to PanelBarItemModel if missing. Features.
Read more >
Angular Error on build: 'Please add a @NgModule annotation'
Does anyone know what I can do to fix this and allow Spread to work with Angular 6 AOT compiling? grapecity. Post Options:...
Read more >
angular/angular-cli - Gitter
Hi, do you have an example app with lazy loading and aot? I have this error: Exported variable 'appModuleRoutes' has or is using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found