Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Building #6

Open
gregduffield opened this issue Dec 29, 2017 · 7 comments
Open

Error Building #6

gregduffield opened this issue Dec 29, 2017 · 7 comments

Comments

@gregduffield
Copy link

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
Copy link
Collaborator

You use webpack or system js ?

@gregduffield
Copy link
Author

gregduffield commented Dec 29, 2017 via email

@arthurvaverko-kaltura
Copy link
Collaborator

arthurvaverko-kaltura commented Dec 29, 2017 via email

@olsn
Copy link

olsn commented Jan 4, 2018

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! 👍

@arthurvaverko-kaltura
Copy link
Collaborator

arthurvaverko-kaltura commented Jan 5, 2018 via email

@moarief
Copy link

moarief commented Dec 1, 2018

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
Copy link

moarief commented Dec 4, 2018

Found the error :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants