Skip to content

Cannot read property 'ngMetadataName' of undefined with @angular-devkit/build-angular 0.800.4 #14888

Closed
@vthinkxie

Description

@vthinkxie

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Yes, the previous version in which this bug was not present was:
@angular-devkit/build-angular 0.800.3

Description

we met an error when update our lib ng-zorro-antd to the latest angular version.

All our ci goes wrong today, and found @Angular-devkit update to 0.800.4, and everthing is ok after locking it to 0.800.3

TypeError: Cannot read property 'ngMetadataName' of undefined

🔬 Minimal Reproduction

🔥 Exception or Error


TypeError: Cannot read property 'ngMetadataName' of undefined
	    at injectArgs (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:573:1)
	    at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:1091:72
	    at _callFactory (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:18522:1)
	    at _createProviderInstance (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:18480:1)
	    at resolveNgModuleDep (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:18455:1)
	    at NgModuleRef_.push.../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:19149:1)
	    at resolveDep (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:19520:1)
	    at createClass (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:19400:1)
	    at createDirectiveInstance (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:19271:1)
	    at createViewNodes (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm5/core.js:27489:1)

Activity

bjornharvold

bjornharvold commented on Jun 25, 2019

@bjornharvold

I was just about to create the same ticket. I can confirm that our application was working with Angular CLI 8.0.3 and failed to load the SPA when upgrading to 8.0.4, as described above. We reverted to 8.0.3 and it works again.

modified the milestone: needsTriage on Jun 25, 2019
modified the milestones: needsTriage, Backlog on Jun 25, 2019
alan-agius4

alan-agius4 commented on Jun 25, 2019

@alan-agius4
Collaborator

From @cexbrayat

The failing tests are using services registered with providedIn: root and not declared in configureTestingModule. If I declare them explicitely in the providers of the testing module, the tests are green again

pinned this issue on Jun 25, 2019
vahidvdn

vahidvdn commented on Jun 25, 2019

@vahidvdn

I have the same issue after upgrading to Angular 8. Any idea?

modified the milestones: Backlog, 8.0.x on Jun 25, 2019

41 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @alfaproject@wangtao@matheo@tan9@bjornharvold

      Issue actions

        Cannot read property 'ngMetadataName' of undefined with @angular-devkit/build-angular 0.800.4 · Issue #14888 · angular/angular-cli