Ngx-quill: Fails under angular 5.0.0

Created on 2 Nov 2017  Â·  25Comments  Â·  Source: KillerCodeMonkey/ngx-quill

I try to start a completely fresh new App with Angular-cli

Add nqx-quill (follow you setup your instructions)

ng Serve

Result :

ERROR in ./node_modules/ngx-quill/src/quill.module.ts
Module build failed: Error: C:\tests\testquill\node_modules\ngx-quill\src\quill.module.ts is not part of the compilation output. Please check the other error messages for details.

bug enhancement

Most helpful comment

@wupaz @vaags @mattmcsparran @nitinht1988

released 2.0.3 all builds should be fixed.

All 25 comments

I do not know what changed in angular 5 and the New cli Version. Maybe you
Have to define the external dependencies somewhere?

Am 02.11.2017 20:07 schrieb "wupaz" notifications@github.com:

I try to start a completely fresh new App with Angular-cli

Add nqx-quill (follow you setup your instructions)

ng Serve

Result :

ERROR in ./node_modules/ngx-quill/src/quill.module.ts
Module build failed: Error: C:\tests\testquill\node_
modules\ngx-quill\src\quill.module.ts is not part of the compilation
output. Please check the other error messages for details.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/74, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ACKOYO_xEOf6d556WCbC0x3HM9cCdmZjks5syhLtgaJpZM4QQMlQ
.

Can confirm this error. See this comment from filipesilva:

"You have TS files in your node_modules. This really goes against how libraries should be packaged: libraries should never ship their source .ts files.

The reason for this rule is that the TypeScript version your app isn't necessarily the same as the TS version your library uses. Different versions of TS can produce different output, and give different errors for the same input. They don't even support the same language features. So packaging libraries with TS sources will always break someone's project.

So we don't really support using incorrectly packaged libraries with TS sources. It's something you do at your risk."

Ref: https://github.com/angular/angular-cli/issues/8284

i will only be able to look into this today evening or this weekend. Feel free to create a pull request, if you solved it on your own ;)

@vaags there are ts files, because i create an aot folder for aot support

see version v2.0.0

tested without angular-cli, but with angular 5 and 4 --> everything is working. there are no .ts files in aot-build, now :)

Would be nice if someone could test it - Reopen this issue if there are some problems.

I'm having the same issue with this.

ERROR in ./node_modules/ngx-quill/src/quill.module.ts Module build failed: Error:node_modules\ngx-quill\src\quill.module.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:629: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) @ ./node_modules/ngx-quill/index.js 1:0-35 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

i'm also running v2.0.0.

Do you need to configure external deps in the cli? I Have a demo repo
without cli and everything is working with angular 5.0. :S

Am 05.11.2017 18:39 schrieb "Matthew McSparran" notifications@github.com:

I'm having the same issue with this.

ERROR in ./node_modules/ngx-quill/src/quill.module.ts Module build
failed: Error:node_modules\ngx-quill\src\quill.module.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:629:23) at plugin.done.then
(node_modules\@ngtools\webpack\src\loader.js:467:39) at at
process._tickCallback (internal/process/next_tick.js:188:7) @
./node_modules/ngx-quill/index.js 1:0-35 @ ./src/app/app.module.ts @
./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0
./src/main.ts

i'm also running v2.0.0.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/74#issuecomment-341990771,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACKOYNAO80sixnrZaQOt1-BLDndbRsiqks5szfLFgaJpZM4QQMlQ
.

@vaags @wupaz @KillerCodeMonkey

Found a fix that gets it to not fail.

Since Bengt incorporated AOT with the package, you need to tell angular cli to do that.

ng serve --aot.

runs with no problems.

can I add a pull request with that new information?

Sure :). But it should work also without aot .. Strange. Thought there
would be more probs with aot build :D

Am 05.11.2017 18:55 schrieb "Matthew McSparran" notifications@github.com:

@vaags https://github.com/vaags @wupaz https://github.com/wupaz
@KillerCodeMonkey https://github.com/killercodemonkey

Found a fix that gets it to not fail.

Since Bengt incorporated AOT with the package, you need to tell angular
cli to do that.

ng serve --aot.

runs with no problems.

can I add a pull request with that new information?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/74#issuecomment-341991927,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACKOYMlvHQrRGoLh8psBmJQccLSsy2yrks5szfZ4gaJpZM4QQMlQ
.

I'm not sure why it doesn't. I kept getting that failure when I would try to run it. I did some digging and tried a couple of different things and this worked. As of now, I don't have any issues, if I come across one, I'll respond here. For a "minor release", this new version of Angular and CLI definitely messed some things up.

@mattmcsparran
i found this issue for angular cli:
https://github.com/angular/angular-cli/issues/8284

Especially these post clears it out. angular cli does not bundle external libs i think so you need to add them to your tsconfig.app.json:

https://github.com/angular/angular-cli/issues/8284#issuecomment-341417325

It seems like the angular cli tries to use import the ts files of ngx-quill instead of the js sources.

So maybe i have to change how to build my module

I saw both of those but wasn't 100% sure on how to add those to it. I did try to remove the TS files after it was compiled to see if it would default to the JS files, but then I received an error with a ts file not being found.

@mattmcsparran could you install ngx-quill@beta in your project?
ng serve should work. but now i get a curious error when i run ng serve --aot

Unexpected value 'QuillModule in /Users/bengtler/dev/ng-test/node_modules/ngx-quill/src/quill.module.d.ts' imported by the module 'AppModule in /Users/bengtler/dev/ng-test/src/app/app.module.ts'. Please add a @NgModule annotation.

Do i have to change something if i want to use aot build?

@KillerCodeMonkey i didn't change anything. i just did --aot. i'll try installing the beta

any update on this? I am also getting error after upgrading to angular 5 with ng serve command. But it is working fine with ng serve --aot.

ERROR in ./node_modules/ngx-quill/src/quill.module.ts Module build failed: Error:node_modules\ngx-quill\src\quill.module.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:629:23) at plugin.done.then (node_modules\@ngtools\webpack\src\loader.js:467:39) at at process._tickCallback (internal/process/next_tick.js:188:7) @ ./node_modules/ngx-quill/index.js 1:0-35 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

i released 2.0.2 it is working for me with ng serve now. But now i get

Unexpected value 'QuillModule in /Users/bengtler/dev/ng-test/node_modules/ngx-quill/src/quill.module.d.ts' imported by the module 'AppModule in /Users/bengtler/dev/ng-test/src/app/app.module.ts'. Please add a @NgModule annotation

if i try aot -.- do not know why. does not changed anything critical in my aot build (only removed the nested node_modules folder)

Maybe someone of you can help me with that.

Hi @KillerCodeMonkey ,

I wish i could help you out solving out your issue but i am very new to angular.
so you mean to say version 2.0.2 still has some issue. So should i upgrade to newer version or should i wait till above issue get resolved?

go for it! ^^

if it is not working downgrade.. ngx-quill is not such a big lib, so it should be easy to go back.

ng serve works for me. but ng serve --aot not. if you are using ng serve it should work.

Would be nice if you could test ng serve --aot and give me feedback.

Sure. Let me upgrade and check --aot.

Hi @KillerCodeMonkey ,

Using ng serve -aot i am getting this error. ng serve is working fine:

ERROR in Error: Unexpected value 'QuillModule in C:/xampp/htdocs/matngular-latest/node_modules/ngx-quill/src/quill.
module.d.ts' imported by the module 'UIComponentsModule in C:/xampp/htdocs/matngular-latest/src/app/components/ui-c
omponents.module.ts'. Please add a @NgModule annotation.

@wupaz @vaags @mattmcsparran @nitinht1988

released 2.0.3 all builds should be fixed.

@KillerCodeMonkey Thanks a lot !!! It is working !!!

What was the fix?

Sent from my iPhone

On Nov 6, 2017, at 5:08 AM, nitinht1988 notifications@github.com wrote:

@KillerCodeMonkey Thanks a lot !!! It is working !!!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Seems like i Have to remove all TS files from build outout. And do not add
aot files to a special folder.

So long story short. I changed my buildprocess a little bit.

Seems like angular cli changed their behaviour which files they in include
to their build process.

But it should work know in and case, with or without cli.

Am 06.11.2017 13:41 schrieb "Matthew McSparran" notifications@github.com:

What was the fix?

Sent from my iPhone

On Nov 6, 2017, at 5:08 AM, nitinht1988 notifications@github.com
wrote:

@KillerCodeMonkey Thanks a lot !!! It is working !!!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/74#issuecomment-342137185,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACKOYHWSdGKZ6hewrz0o5mrZly2_4_CDks5szv6KgaJpZM4QQMlQ
.

@KillerCodeMonkey just tried it and it worked. thanks! i appreciate your help. Thanks for working so hard to get it all resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tommueller picture tommueller  Â·  3Comments

MarkusLei22 picture MarkusLei22  Â·  5Comments

Rlcolli4 picture Rlcolli4  Â·  3Comments

SebastianPodgajny picture SebastianPodgajny  Â·  4Comments

pedrojrivera picture pedrojrivera  Â·  4Comments