-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity3: broken
Description
Versions
Angular CLI: 1.6.3
Node: 8.9.4
OS: win32 x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.3
@angular-devkit/build-optimizer: 0.0.37
@angular-devkit/core: 0.0.24
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.3
@schematics/angular: 0.1.12
typescript: 2.4.2
webpack: 3.10.0
Repro steps
sample repo: https://github.com/CrispyBacon12/has-no-internal-name
- Create a new app
- Create a new module, with a component
- Define the component as an entryComponent in the module, and export it from that same module file
- Import the component via the module file and utilise it
(import { NavigatorComponent } from './navigator/navigator.module'
) npm run build
Observed behavior
ERROR in chunk main [initial]
[name].[chunkhash:20].bundle.js
The export "NavigatorComponent" in "C:/Users/Chris/Web/GitHub/repro/src/app/navigator/navigator.module.ts" has no internal name
Error: The export "NavigatorComponent" in "C:/Users/Chris/Web/GitHub/repro/src/app/navigator/navigator.module.ts" has no internal name
at getFinalName (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\optimize\ConcatenatedModule.js:60:13)
at info.globalScope.through.forEach.reference (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\optimize\ConcatenatedModule.js:582:25)
at Array.forEach (<anonymous>)
at modulesWithInfo.forEach.info (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\optimize\ConcatenatedModule.js:569:30)
at Array.forEach (<anonymous>)
at ConcatenatedModule.source (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\optimize\ConcatenatedModule.js:567:19)
at ModuleTemplate.render (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\ModuleTemplate.js:14:31)
at C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\Template.js:116:28
at Function.from (native)
at Chunk.mapModules (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\Chunk.js:163:16)
at ChunkTemplate.renderChunkModules (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\Template.js:113:26)
at ChunkTemplate.render (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\ChunkTemplate.js:16:30)
at Compilation.createChunkAssets (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\Compilation.js:1397:35)
at sealPart2 (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\Compilation.js:655:10)
at next (C:\Users\Chris\Web\GitHub\repro\node_modules\tapable\lib\Tapable.js:202:11)
at Compilation.compilation.plugin (C:\Users\Chris\Web\GitHub\repro\node_modules\webpack\lib\ProgressPlugin.js:111:6)
Desired behavior
Expected build not to fail under these conditions
Mention any other details that might be useful (optional)
- This only occurs when using both --prod and AoT. Doing
ng build --prod --aot false
succeeds. - Either importing the component directly, or via a separate barrel file, does not cause an error. Only when importing via the same module file that it is being declared in.
- No cyclic dependency warnings are shown, if that's the problem?
- Thanks
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity3: broken