-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'xxxx' of undefined #23712
Comments
@trotyl @ericmartinezr Why the thumbs down? This is definitely an issue. |
No reproduction, wrong repo. |
There's a reproduction. It's clearly outlined. What wrong repo? This is angular. |
Duplicate of angular/angular-cli#10655, not an Angular issue. |
Ok... well as long as someone knows... |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
[x] Bug report
Current behavior
In previous versions with the cli (6.0.0-rc.10 with 6.0.0-rc.6 of the compiler) everything was fine. IN the new version we're getting a ton of TypeError: Cannot read property 'xxx' of undefined.
ngx-quill causes this as does the following:
`
export namespace Enums {
export enum AccountTypes {
Checking = 1,
Savings = 2,
SharedDraft = 3,
}
}
`
and this in app.module.ts:
import { Enums } from './api/xxx.Interfaces';
It appears that all of the Enums items are all factored out and cause undefined.
Expected behavior
Should work like 6.0.0-rc.6 (and cli rc.10) and not factor out this code causing errors.
Environment
Angular CLI: 6.0.0
Node: 8.10.0
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Package Version
@angular-devkit/architect 0.6.0
@angular-devkit/build-angular 0.6.0
@angular-devkit/build-optimizer 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@ngtools/webpack 6.0.0
@schematics/angular 0.6.0
@schematics/update 0.6.0
rxjs 6.1.0
typescript 2.7.2
webpack 4.6.0
Browser:
For Tooling issues:
##Steps to Reproduce
ng new projectname
Add a new ts file with the above snippet of typescript
Import it into app.module.
In app.component.ts import it again and attempt to use it there. Or do the same in the app.module in n APP_INITIALIZER. In both cases you'll get the above error.
The text was updated successfully, but these errors were encountered: