ngx-uploader icon indicating copy to clipboard operation
ngx-uploader copied to clipboard

Error with Angular 5 and 4.1.2

Open rafaelss95 opened this issue 8 years ago • 8 comments

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)

rafaelss95 avatar Nov 09 '17 12:11 rafaelss95

what version of angular-cli are you running? cannot reproduce on latest one 1.5.0.

jkuri avatar Nov 09 '17 12:11 jkuri

did you imported module as

import { NgUploaderModule } from 'ngx-uploader';

jkuri avatar Nov 09 '17 12:11 jkuri

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';.

rafaelss95 avatar Nov 09 '17 12:11 rafaelss95

I am appending sample project. Both ng serve and ng serve --aot works as expected. proj.zip

jkuri avatar Nov 09 '17 12:11 jkuri

Try with import { NgUploaderModule } from 'ngx-uploader/ngx-uploader';

mdhanju avatar Nov 09 '17 23:11 mdhanju

@rafaelss95 could you please check the sample project from @jkuri? Thank you!

retailify avatar Nov 13 '17 09:11 retailify

@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"
    ]
}

mjurczyk avatar Nov 20 '17 03:11 mjurczyk

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.

killbox-code avatar Dec 29 '17 14:12 killbox-code