arthurvaverko / ngx-highlight

Angular directive to highlight text in the html container and it's children.
https://arthurvaverko.github.io/ngx-highlight/
MIT License
17 stars 8 forks source link

Error Building #6

Open gregduffield opened 6 years ago

gregduffield commented 6 years ago

Have followed the instructions, but with the addition of ngx-highlight the Angular CLI can no longer build the project, see the error below.

ERROR in ./node_modules/ngx-highlight/highlight.module.ts
Module build failed: Error: C:\Repos\proteo-analytics\node_modules\ngx-highlight\highlight.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or
 i
Module build failed: Error: C:\Repos\proteo-analytics\node_modules\ngx-highlight\highlight.module.ts is missing from the TypeScript compilation. Please make sure ite library repository to alert its author is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (C:\Repos\proteo-analytics\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:653:23)
    at plugin.done.then (C:\Repos\proteo-analytics\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at process._tickCallback (internal/process/next_tick.js:109:7)
 @ ./src/app/shared/shared.module.ts 30:25-66
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
arthurvaverko-kaltura commented 6 years ago

You use webpack or system js ?

gregduffield commented 6 years ago

I am using Webpack via the angular cli (1.6.3). This is a standard project created via the CLI.

Please let me know if you need anything else.

Thanks greg

From: Arthur Vaverko [mailto:notifications@github.com] Sent: 29 December 2017 09:45 To: arthurvaverko/ngx-highlight ngx-highlight@noreply.github.com Cc: Greg Duffield g.duffield@proteo.co.uk; Author author@noreply.github.com Subject: Re: [arthurvaverko/ngx-highlight] Error Building (#6)

You use webpack or system js ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/arthurvaverko/ngx-highlight/issues/6#issuecomment-354423361, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA_MOYHpsLlETZaecjQYV6Te7WgLGGGLks5tFLS2gaJpZM4RO-sg.

Greg Duffield CEO Mobile:+44 07974735020

[http://servicedesk.proteo.co.uk/images/Proteo-White.png] Proteo Ltd, St Marys Croft, 13 Chapel Field North, Norwich, NR2 1NY Registered in England: 04630809, Registered office: As above, VAT registration number: 807083929 t: +44(0)845 6443750 http://www.proteo.co.uk CONFIDENTIALITY: This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium. Although this e-mail and any attachments are believed to be free from any virus or other defect which might affect any system into which they are opened or received, it is the responsibility of the recipient to check that they are virus free and that they will in no way affect systems and data. No responsibility is accepted by Proteo Ltd for any loss or damage arising in any way from their receipt, opening or use.

arthurvaverko-kaltura commented 6 years ago

Well it was a while since i updated this project.. Ill try to get to it to reproduce ..

Atthe mean time if you see something that can help add more comments ..

On Dec 29, 2017 11:51, "Greg Duffield" notifications@github.com wrote:

I am using Webpack via the angular cli (1.6.3). This is a standard project created via the CLI.

Please let me know if you need anything else.

Thanks greg

From: Arthur Vaverko [mailto:notifications@github.com] Sent: 29 December 2017 09:45 To: arthurvaverko/ngx-highlight ngx-highlight@noreply.github.com Cc: Greg Duffield g.duffield@proteo.co.uk; Author < author@noreply.github.com> Subject: Re: [arthurvaverko/ngx-highlight] Error Building (#6)

You use webpack or system js ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ arthurvaverko/ngx-highlight/issues/6#issuecomment-354423361, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA_ MOYHpsLlETZaecjQYV6Te7WgLGGGLks5tFLS2gaJpZM4RO-sg.

Greg Duffield CEO Mobile:+44 07974735020 <+44%207974%20735020>

[http://servicedesk.proteo.co.uk/images/Proteo-White.png] Proteo Ltd, St Marys Croft, 13 Chapel Field North, Norwich, NR2 1NY https://maps.google.com/?q=13+Chapel+Field+North,+Norwich,+NR2+1NY&entry=gmail&source=g Registered in England: 04630809, Registered office: As above, VAT registration number: 807083929 t: +44(0)845 6443750 <+44%20845%20644%203750> http://www.proteo.co.uk CONFIDENTIALITY: This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium. Although this e-mail and any attachments are believed to be free from any virus or other defect which might affect any system into which they are opened or received, it is the responsibility of the recipient to check that they are virus free and that they will in no way affect systems and data. No responsibility is accepted by Proteo Ltd for any loss or damage arising in any way from their receipt, opening or use.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arthurvaverko/ngx-highlight/issues/6#issuecomment-354423940, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeY4b_OWV6sIZoQZyMz6-meCVX1sEo1ks5tFLYYgaJpZM4RO-sg .

olsn commented 6 years ago

Same for me - the issue is that this repo ships the TS-files with NPM, but this should actually never be done - since there are a many drawbacks to this, some being:

Basically this would be like shipping the C++ source-code instead of a .dll-library. So instead of shipping the TS-files, you should add a compile-step to compile to JavaScript and Typing-Files and ship those instead. And since this is a public repo you could even have github do all the work for free, simply setup a travis.yml-file to do that (have a look here for an example - https://github.com/bcoe/travis-deploy-example)

As a temporary solution, since it's only one directive: I've copy/pasted the directive-file to my sources and added it directly as a declaration to my app-module - works like a charm, thank you for the directive! :+1:

arthurvaverko-kaltura commented 6 years ago

happy to help... thanks for the example and detailed explanation. unfortunately I don't have much time to do all that .. (i will get to it one day) at the meantime if any one feels that he can package this better please pull request me :)..

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Jan 4, 2018 at 10:32 PM, Olaf Horstmann notifications@github.com wrote:

Same for me - the issue is that this repo ships the TS-files with NPM, but this should actually never be done - since there are a many drawbacks to this, some being:

  • compiling takes longer in any case
  • compiling might not even be possible because certain configuration might be missing
  • import-path issues due to the location of the files now being inside the node_modules
  • and more

Basically this would be like shipping the C++ source-code instead of a .dll-library. So instead of shipping the TS-files, you should add a compile-step to compile to JavaScript and Typing-Files and ship those instead. And since this is a public repo you could even have github do all the work for free, simply setup a travis.yml-file to do that (have a look here for an example - https://github.com/bcoe/travis-deploy-example)

As a temporary solution, since it's only one directive: I've copy/pasted the directive-file to my sources and added it directly as a declaration to my app-module - works like a charm, thank you for the directive! 👍

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arthurvaverko/ngx-highlight/issues/6#issuecomment-355390827, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeY4TufBtuMODKiKZrHo3czzpkduyZYks5tHTVNgaJpZM4RO-sg .

moarief commented 5 years ago

As a temporary solution, since it's only one directive: I've copy/pasted the directive-file to my sources and added it directly as a declaration to my app-module - works like a charm, thank you for the directive!

Could someone show me how? Or which fills? I have tried this, but the highlighter only highlights on single character and word??

moarief commented 5 years ago

Found the error :)