- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11.9k
 
Closed
Labels
area: @angular-devkit/build-angularneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given
Milestone
Description
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [x] build
- [x] serve
- [x] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
node: v9.8.0
npm: 6.4.1
ng: 7.0.3
os: macOS Mojave
Repro steps
In our Angular app we use a library consisting of only .ts files. these are mostly typings (so we should maybe use .d.ts as suffix, but without this compilation worked fine in Angular 6.1.5.
After upgrading, for 3 out of 36 .ts files we get errors looking like the one in the log section below.
After including the include property in our tsconfig.json file:
"include" : [
    "node_modules/@customTypings/**/*.ts",
    "src/main.ts",
    "src/polyfills.ts"
  ]
we get the same error for our main.ts and polyfills.ts files. After adding also these files, that fixes compilation for ng serve and ng build. For ng test (with Karma) however, we still get the same errors, even though our tsconfig.spec.json extends tsconfig.json.
Will try to come up with an MWE, WIP
The log given by the failure
ERROR in ./node_modules/@customTypings/api/lib/common.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /Users/michahell/project/node_modules/@customTypings/api/lib/common.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (/Users/michahell/project/node_modules/@ngtools/webpack/src/packages/ngtools/webpack/src/angular_compiler_plugin.ts:1028:15)
    at plugin.done.then (/Users/michahell/project/node_modules/@ngtools/webpack/src/packages/ngtools/webpack/src/loader.ts:49:29)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
 @ ./src/app/components/conversation-message/conversation-message.component.spec.ts 13:15-44
 @ ./src sync \.spec\.ts$
 @ ./src/test.ts
Desired functionality
compilation succeeds as before in 6.1.7
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angularneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given