jvandemo / jvandemo/generator-angular2-library

Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field

Open
#249 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
740
Forks
116
PR merge metrics
No merged PRs in 30d

Description

since angular-cli 1.6.0 I get the following error:

Thing is I don't really know if it's an angular-cli problem. it was working a few days ago without any change. Out build server started to fail.

The error occurs in the `ngc` task:

> 2017-12-14T15:07:43.7558989Z [16:07:43] 'ngc' errored after 466 ms
2017-12-14T15:07:43.7558989Z [16:07:43] Error: ngc compilation failed: : Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field.
2017-12-14T15:07:43.7558989Z
2017-12-14T15:07:43.7558989Z at ngc (D:\Agents\Build1\_work\23\s\my-dnn\gulpfile.js:54:13)
2017-12-14T15:07:43.7558989Z at reportErrorsAndExit (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\@angular\compiler-cli\src\main.js:126:9)
2017-12-14T15:07:43.7558989Z at main (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\@angular\compiler-cli\src\main.js:30:12)
2017-12-14T15:07:43.7558989Z at Gulp. (D:\Agents\Build1\_work\23\s\my-dnn\gulpfile.js:52:10)
2017-12-14T15:07:43.7558989Z at module.exports (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\orchestrator\lib\runTask.js:34:7)
2017-12-14T15:07:43.7558989Z at Gulp.Orchestrator._runTask (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\orchestrator\index.js:273:3)
2017-12-14T15:07:43.7558989Z at Gulp.Orchestrator._runStep (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\orchestrator\index.js:214:10)
2017-12-14T15:07:43.7558989Z at Gulp.Orchestrator.start (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\orchestrator\index.js:134:8)
2017-12-14T15:07:43.7558989Z at runNextSet (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\run-sequence\index.js:123:15)
2017-12-14T15:07:43.7558989Z at Gulp.onTaskEnd (D:\Agents\Build1\_work\23\s\my-dnn\node_modules\run-sequence\index.js:101:4)
2017-12-14T15:07:43.7558989Z ERROR: ngc compilation failed: : Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field.
2017-12-14T15:07:43.7558989Z
2017-12-14T15:07:43.7871492Z ##[error]Gulp failed with error: C:\Program Files\nodejs\node.exe failed with return code: 1
2017-12-14T15:07:43.7871492Z ##[section]Finishing: [my-dnn] generate dist

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in gulpfile.js around the ngc task at lines 52–54, then inspect the Angular compiler-cli configuration that supplies the files field and flatModuleIndex option. Reproduce the reported ngc failure and determine the project configuration change needed for compilation to succeed without violating the one-file requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.