Error with Angular 5 and 4.1.2
I just installed the latest version of this module and I'm getting the following error when I ran ng serve:
MY_PATH/node_modules/ngx-uploader/index.ts is not pa rt of the compilation output. Please check the other error messages for details. at AngularCompilerPlugin.getCompiledFile (/MY_PATH/node_modules/@ngtools/webp ack/src/angular_compiler_plugin.js:629:23) at plugin.done.then (/MY_PATH/node_modules/@ngtools/webpack/src/loader.js:467 :39) at
at process._tickCallback (internal/process/next_tick.js:188:7)
what version of angular-cli are you running? cannot reproduce on latest one 1.5.0.
did you imported module as
import { NgUploaderModule } from 'ngx-uploader';
I'm using the latest also.
ng -v:
Angular CLI: 1.5.0
Node: 8.4.0
OS: darwin x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router
@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1
And I'm importing the module this way import { NgUploaderModule } from 'ngx-uploader';.
I am appending sample project. Both ng serve and ng serve --aot works as expected.
proj.zip
Try with import { NgUploaderModule } from 'ngx-uploader/ngx-uploader';
@rafaelss95 could you please check the sample project from @jkuri? Thank you!
@rafaelss95 This is an angular-cli issue, try adding MY_PATH/node_modules/ngx-uploader/index.ts to tsconfig.json under include:
{
"include": [
/* Your project files' glob, "src/**/*.ts" etc. */,
"node_modules/ngx-uploader/index.ts"
]
}
Just ran into this using [email protected] in a project w/ the following specs: `Angular CLI: 1.6.3 Node: 9.2.0 OS: darwin x64 Angular: 5.1.2 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router, service-worker
@angular/cli: 1.6.3 @angular/flex-layout: 2.0.0-beta.12 @angular/tsc-wrapped: 4.4.6 @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.3 @schematics/angular: 0.1.11 @schematics/schematics: 0.0.11 typescript-formatter: 7.0.1 typescript: 2.6.2 webpack: 3.10.0`
Downgrading typescript to 2.5.3 and issue is no longer observed. This was not incredibly surprising as TS 2.6.x is not yet officially support for angular. I see from above that @rafaelss95 is not using unsupported TS so his issue was likely resolved by addressing as suggested by @mdhanju or @mjurczyk - just wanted to post this in case anyone else finds their way to this page looking for answers.