Skip to content

Valid TypeScript generates build error #3753

Description

@bdphil86

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 10

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.24
node: 7.2.0
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Yes. App was created using CLI.

I like to export all items at the end of my file rather than inline. So, I am seeing an error when I have valid code written as:

...
class SomeComponent {
  ...
}

export { SomeComponent }

However, if I change the placement of the export, the error goes away:

...
export class SomeComponent {
  ...
}

This shouldn't generate an error considering it is valid TS.

The log given by the failure.

Normally this include a stack trace and some more information.

The error is similar to:
ERROR in Error encountered resolving symbol values statically. Reference to a non-exported class SomeComponent. Consider exporting the class (position 6:1 in the original .ts file), resolving symbol SomeComponent in C:/path/src/app/some/some.component.ts

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions