Closed mahidaturgana closed 5 years ago
Thanks for reporting it. Please update to v1.4.2 and let me know if you have any issues.
Error is still present while using v1.4.2 - Tested against my full solution and against a fresh CLI created project as described above.
Further investigation: If either the lodash-es/filter import or the ChangeDetectorRef are removed, there is no error and the spec file generates appropriately.
Please post a piece of code to repro the issue, like you did before. Your original code now works with v1.4.2 so I need a new file to test with. Thanks.
For the isolated scenario above, seems I spoke too soon, that is fixed. Perhaps VSCode didn't take the changes properly.
That said, in my full solution I am still running into the same error. I've almost got it isolated to a simple reproduction case. Would you like a new issue filed or continue in the comments here?
Here is fine =)
import { Component, ChangeDetectorRef, OnInit } from '@angular/core';
import filter from 'lodash-es/filter';
export enum Types {
TypeA = 1,
TypeB = 2,
TypeC = 3,
}
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
public TempTypes = Types;
title = 'testing';
constructor() {
console.log('ctor');
}
public ngOnInit() {
console.log('ngOnInit');
}
}
Added: enum Removed: ChangeDetectorRef
Again, if the lodash-es/filter import is removed, everything works.
Should be solved in v1.4.3 Let me know how it goes.
@ManuelDeLeon - Looks good. Thanks for the quick turnaround.
Spinning up a new test scenario with CLI, including lodash-es, and using the following AppComponent will generate the error "Cannot read property 'elements' of undefined"