question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: .../sandbox/node_modules/ngx-responsive/src/index.ts is not part of the compilation output. Please check the other error messages for details.

See original GitHub issue

When trying to serve my application I get the following error:

ERROR in ./node_modules/ngx-responsive/src/index.ts
Module build failed: Error: /Users/.../Documents/sandbox/node_modules/ngx-responsive/src/index.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (/Users/.../Documents/sandbox/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:624:23)
    at plugin.done.then (/Users/.../Documents/sandbox/node_modules/@ngtools/webpack/src/loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./node_modules/ngx-responsive/index.js 1:0-109
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

This is some information about my setup:

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.5.3
Node: 8.3.0
OS: darwin x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.3
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.3
@schematics/angular: 0.1.5
typescript: 2.4.2
webpack: 3.8.1

and my app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ResponsiveModule } from 'ngx-responsive';
import { AppRoutingModule } from './app-routing.module';

import { AppComponent } from './app.component';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    ResponsiveModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

I read in this topic that having TS files in the node_modules folder goes against how libraries should be packaged: libraries should never ship their source .ts files.

I’m not sure if this might be the root of the problem. Anyone else with the same issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
HermanMarvelcommented, Jan 10, 2018

@ManuCutillas working on webpack 3 without any issues. Will revert if any. Thanks a lot for the quick fix!

2reactions
merihscommented, Nov 23, 2017

I have exactly same issue


Angular CLI: 1.5.3
Node: 8.9.1
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cli: 1.5.3
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.3
@schematics/angular: 0.1.5
typescript: 2.4.2
webpack: 3.8.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

index.ts is not part of the compilation output - Stack Overflow
It seems to be with the compiler not recognizing the index.ts file. I'm not sure why. Below is the error: ERROR in ./node_modules/datatable/ ......
Read more >
node_modules\ngx-http-rest\index.ts is not part of the ... - GitHub
node_modules\ngx-http-rest\index.ts is not part of the compilation output. Please check the other error messages for details. #8406.
Read more >
Angular – index.ts is not part of the compilation output - iTecNote
I am trying to compile my Angular application and am getting an error. It seems to be with the compiler not recognizing the...
Read more >
25.1. Running Compilations under Emacs
Run a compiler asynchronously under Emacs, with error messages to *compilation* buffer. ... To run make or another compilation command, do M-x compile....
Read more >
ts is missing from the TypeScript compilation. - Shadi Atawneh
ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found