Skip to content

ng no longer supports source in an npm package #8963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chuckjaz opened this issue Dec 21, 2017 · 2 comments
Closed

ng no longer supports source in an npm package #8963

chuckjaz opened this issue Dec 21, 2017 · 2 comments

Comments

@chuckjaz
Copy link

Versions

Angular CLI: 1.6.1
Node: 8.9.3
OS: darwin x64
Angular: 5.1.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.1
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0

Repro steps

From angular/angular#20091 (comment)

$ git clone [email protected]:chuckjaz/repro-20091.git
$ cd repro-20091
$ yarn install
$ ng build

Observed behavior

ERROR in ./node_modules/angular-bootstrap-md/index.ts
Module build failed: Error: ./node_modules/angular-bootstrap-md/index.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (./node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:649:23)
    at plugin.done.then (./node_modules/@ngtools/webpack/src/loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./src/app/app.module.ts 9:0-58
 @ ./src/main.ts
 @ multi ./src/main.ts

Desired behavior

No error message.

Mention any other details that might be useful (optional)

This works with Angular 4.4.2 which can be demonstrated by:

  1. git checkout adac6d359dbc1efa1ca70ef290f90359794b0ee1
  2. yarn install
  3. ng build

ng --version

Angular CLI: 1.6.1
Node: 8.9.3
OS: darwin x64
Angular: 4.4.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, tsc-wrapped

@angular/cli: 1.6.1
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.3.4
webpack: 3.10.0
@filipesilva
Copy link
Contributor

This issue is a duplicate of #8284 (comment).

In that issue an in-depth explanation of what changed is included. The short version is that files that are meant to be compiled by TypeScript must be listed in src/tsconfig.app.json. There is currently a bug with AOT compilation where this isn't required (angular/angular#20115), but that should be fixed in the future.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants