Skip to content

AOT import * error: ERROR in Illegal state: symbol without members expected, but got #6443

@MaklaCof

Description

@MaklaCof

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

I did and search suggested to open new issue.

Versions.

node --version: v7.10.0
npm --version: 4.2.0
window 10 - 64bit

Repro steps.

Running command: webpack --env.aot --env.client & webpack --env.aot --env.server from aspnetcore-angular2-universal.
When importing components/services with * I get error if any import also includes *.
For example this works:

//lazy.module.ts
import * as components from "./components/all";

//all.ts
import {SomeComponent} from "./some";
export {SomeComponent};

And this is not working:

//lazy.module.ts
import * as components from "./components/all";

//all.ts
import * as childs from "./childs";                 //I THINK THIS CAUSE ERROR
import {SomeComponent} from "./some";
export {childs, SomeComponent};

//childs.ts
import {OtherComponent} from "./other";
export {OtherComponent};

The log given by the failure.

ERROR in Illegal state: symbol without members expected, but got {"filePath":"E:/test-project/trunk/test-project/Client/app/modules/lazy/components/all.ts","name":"childs","members":["OtherComponent"]}.

Desired functionality.

AOT compiles successfully.

Full error

 ERROR in Illegal state: symbol without members expected, but got {"filePath":"E:/test-project/trunk/test-project/Client/app/modules/lazy/components/all.ts","name":"childs","members":["OtherComponent"]}.

    ERROR in E:/test-project/trunk/test-project/Client/main.server.aot.ts (11,42): Cannot find module './ngfactory/app/server-app.module.ngfactory'.

    ERROR in ./Client/main.server.aot.ts
    Module not found: Error: Can't resolve './ngfactory/app/server-app.module.ngfactory' in 'E:\test-project\trunk\test-project\Client'
     @ ./Client/main.server.aot.ts 7:0-87

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity3: broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions